user-select mixin with docs and tests
This commit is contained in:
parent
cdf11d7002
commit
d0067d7122
@ -0,0 +1,24 @@
|
||||
@import "shared";
|
||||
|
||||
// User Interface ------------------------------------------------------------
|
||||
// This file can be expanded to handle all the user interface properties as
|
||||
// they become available in browsers:
|
||||
// http://www.w3.org/TR/2000/WD-css3-userint-20000216
|
||||
|
||||
// User Select ---------------------------------------------------------------
|
||||
// This property controls the selection model and granularity of an element.
|
||||
//
|
||||
// @param $select
|
||||
// [ none | text | toggle | element | elements | all | inherit ]
|
||||
|
||||
@mixin user-select($select) {
|
||||
$select: unquote($select);
|
||||
// Mozilla needs prefix on both the -moz-property and the -moz-value
|
||||
@include experimental(user-select, -moz-#{$select},
|
||||
-moz, not -webkit, not -o, not -ms, not -khtml, not official
|
||||
);
|
||||
// others do not
|
||||
@include experimental(user-select, $select,
|
||||
not -moz, -webkit, not -o, not -ms, -khtml, official
|
||||
);
|
||||
}
|
5
test/fixtures/stylesheets/compass/css/user-interface.css
vendored
Normal file
5
test/fixtures/stylesheets/compass/css/user-interface.css
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.user-select {
|
||||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none; }
|
5
test/fixtures/stylesheets/compass/sass/user-interface.scss
vendored
Normal file
5
test/fixtures/stylesheets/compass/sass/user-interface.scss
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
@import "compass/css3/user-interface";
|
||||
|
||||
.user-select {
|
||||
@include user-select(none);
|
||||
}
|
Loading…
Reference in New Issue
Block a user