User Tools

Site Tools


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'élément
 +
 +<code>
 +.item {
 +  background: white;
 +  &:hover {
 +    background: red;
 +  }
 +}
 +</code>
 +
 +<code>
 +@mixin clearfix {
 +  &:before,
 +  &:after {
 +    content:'';
 +    display: table;
 +  }
 +  &:after {
 +    clear:both;
 +  }
 +}
 +
 +.item {
 +  @include clearfix;
 +}
 +</code>
 +
 +Contextual class
 +
 +<code>
 +.item {
 +  #abc & { // #abc .item {}
 +    color: red;
 +  }
 +}
 +</code>
sasset/referencing_parent_selectors_with.txt · Last modified: 2016/04/02 11:52 by leo