Permalink
Browse files

Add changelog docs for placeholder selectors.

  • Loading branch information...
1 parent 911e3bc commit f1dc284953a4aa36423eecc27b1e8669f65722a9 @nex3 nex3 committed Jan 5, 2012
Showing with 32 additions and 0 deletions.
  1. +32 −0 doc-src/SASS_CHANGELOG.md
View
32 doc-src/SASS_CHANGELOG.md
@@ -39,6 +39,38 @@ Produces:
Note that the contents passed to the mixin are evaluated in the scope they are used,
not the scope of the mixin. {file:SASS_REFERENCE.md#variable_scope_and_content_blocks More on variable scoping.}
+### Placeholder Selectors: `%foo`
+
+Sass supports a new, special type of selector called a "placeholder selector".
+These look like class and id selectors, except the `#` or `.` is replaced by `%`.
+They're meant to be used with the {file:SASS_REFERENCE.md#extend `@extend` directive},
+when you want to write styles to be extended
+but you don't want the base styles to appear in the CSS.
+
+On its own, a placeholder selector just causes a ruleset not to be rendered.
+For example:
+
+ // This ruleset won't be rendered on its own.
+ #context a%extreme {
+ color: blue;
+ font-weight: bold;
+ font-size: 2em;
+ }
+
+However, placeholder selectors can be extended, just like classes and ids.
+The extended selectors will be generated, but the base placeholder selector will not.
+For example:
+
+ .notice { @extend %extreme; }
+
+Is compiled to:
+
+ #context a.notice {
+ color: blue;
+ font-weight: bold;
+ font-size: 2em;
+ }
+
### `:any` Support
Previously, only the `:-moz-any` selector was supported; this has been expanded

0 comments on commit f1dc284

Please sign in to comment.