cv-website

Personal website and CV
git clone https://git.in0rdr.ch/cv-website.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

_selection.scss (806B)


      1 @charset "UTF-8";
      2 
      3 /// Outputs the spec and prefixed versions of the `::selection` pseudo-element.
      4 ///
      5 /// @param {Bool} $current-selector [false]
      6 ///   If set to `true`, it takes the current element into consideration.
      7 ///
      8 /// @example scss - Usage
      9 ///   .element {
     10 ///     @include selection(true) {
     11 ///       background-color: #ffbb52;
     12 ///     }
     13 ///   }
     14 ///
     15 /// @example css - CSS Output
     16 ///   .element::-moz-selection {
     17 ///     background-color: #ffbb52;
     18 ///   }
     19 ///
     20 ///   .element::selection {
     21 ///     background-color: #ffbb52;
     22 ///   }
     23 
     24 @mixin selection($current-selector: false) {
     25   @if $current-selector {
     26     &::-moz-selection {
     27       @content;
     28     }
     29 
     30     &::selection {
     31       @content;
     32     }
     33   } @else {
     34     ::-moz-selection {
     35       @content;
     36     }
     37 
     38     ::selection {
     39       @content;
     40     }
     41   }
     42 }