forked from Compass/compass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Compass#509 from ericam/stable
user-select mixin with docs and tests
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
frameworks/compass/stylesheets/compass/css3/_user-interface.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.user-select { | ||
-moz-user-select: -moz-none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
user-select: none; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import "compass/css3/user-interface"; | ||
|
||
.user-select { | ||
@include user-select(none); | ||
} |