summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/bourbon/app/assets/stylesheets/css3/_selection.scss
blob: 216fff5c305260cae503e256b59f016e0997ff83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@charset "UTF-8";

/// Outputs the spec and prefixed versions of the `::selection` pseudo-element.
///
/// @param {Bool} $current-selector [false]
///   If set to `true`, it takes the current element into consideration.
///
/// @example scss - Usage
///   .element {
///     @include selection(true) {
///       background-color: #ffbb52;
///     }
///   }
///
/// @example css - CSS Output
///   .element::-moz-selection {
///     background-color: #ffbb52;
///   }
///
///   .element::selection {
///     background-color: #ffbb52;
///   }

@mixin selection($current-selector: false) {
  @include _bourbon-deprecate-for-prefixing("selection");

  @if $current-selector {
    &::-moz-selection {
      @content;
    }

    &::selection {
      @content;
    }
  } @else {
    ::-moz-selection {
      @content;
    }

    ::selection {
      @content;
    }
  }
}