sasset:referencing_parent_selectors_with
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | sasset:referencing_parent_selectors_with [2016/04/02 11:52] (current) – created leo | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |<- [[Using the @extend method]]|[[Using comments and hidden comments]] ->| | ||
| + | & est un sélecteur spécial désignant le parent de l' | ||
| + | |||
| + | < | ||
| + | .item { | ||
| + | background: white; | ||
| + | &:hover { | ||
| + | background: red; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | @mixin clearfix { | ||
| + | &: | ||
| + | &:after { | ||
| + | content:''; | ||
| + | display: table; | ||
| + | } | ||
| + | &:after { | ||
| + | clear:both; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | .item { | ||
| + | @include clearfix; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Contextual class | ||
| + | |||
| + | < | ||
| + | .item { | ||
| + | #abc & { // #abc .item {} | ||
| + | color: red; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
sasset/referencing_parent_selectors_with.txt · Last modified: 2016/04/02 11:52 by leo