Skip to main content

font-selection

Generate a ::selection pseudo-element.

ParameterTypeDescription
$font-colorstringColor name defined in config
$selection-background-colorstringColor name defined in config

Example

assets/styles/config/typography/color/_index.scss
.m-example-component {
$first: #000;
$second: #999;
$third: #d5d5d5;
$fourth: #f5f5f5;
$fifth: #fff;
$sixth: #f5f5f5;
$seventh: #f0f0f0;
$error: #f00;
}
Components/ExampleComponent/_style.scss
.m-example-component {
@include font-selection(first, second);
}
dist/frontend.css
.m-example-component {
&::selection {
color: #000;
background-color: #999;
}
}