Class | Properties |
---|---|
.select-none | user-select: none; |
.select-text | user-select: text; |
Usage
Use .select-none
to prevent text from being selected in an element (and its children).
Use .select-text
to allow text to be selected in an element (and its children).
Variants
By default, no responsive or hover-state variants are generated for user select utilities.
Responsive
To include responsive variants like .md:select-none
, add "user-select"
to the $responsive-variants
variable in your theme’s _variables.scss
file when recompiling your CSS:
$responsive-variants: (
// ...
"user-select",
);
Hover-state
To include hover-state variants like .hover:select-none
, add "user-select"
to the $hover-variants
variable:
$hover-variants: (
// ...
"user-select",
);