Skip to content

Commit

Permalink
Merge pull request Compass#509 from ericam/stable
Browse files Browse the repository at this point in the history
user-select mixin with docs and tests
  • Loading branch information
mirisuzanne committed Sep 12, 2011
2 parents 93811a6 + f4d1a82 commit 92981fb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc-src/content/CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ The Documentation for the [latest stable release](http://compass-style.org/docs/

The Documentation for the [latest preview release](http://beta.compass-style.org/)

0.11.6 (UNRELEASED)
-------------------

* Added `user-select` mixin to control the selection model and granularity of an element. It accepts one argument (`$select`) from the following options: `none` | `text` | `toggle` | `element` | `elements` | `all` | `inherit`.

0.11.5 (07/10/2011)
-------------------

Expand Down
24 changes: 24 additions & 0 deletions frameworks/compass/stylesheets/compass/css3/_user-interface.scss
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
);
}
5 changes: 5 additions & 0 deletions test/fixtures/stylesheets/compass/css/user-interface.css
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; }
5 changes: 5 additions & 0 deletions test/fixtures/stylesheets/compass/sass/user-interface.scss
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);
}

0 comments on commit 92981fb

Please sign in to comment.