|
8 | 8 | ) {
|
9 | 9 | // We're setting this on the parent tag, so that it could get overwritten via data-icon=*
|
10 | 10 | @if $glyph != "" {
|
11 |
| - --icon-glyph-#{$position}: "#{$glyph}"; |
| 11 | + & { |
| 12 | + --icon-glyph-#{$position}: "#{$glyph}"; |
| 13 | + } |
12 | 14 | }
|
13 | 15 |
|
14 | 16 | &::#{$position} {
|
|
37 | 39 | }
|
38 | 40 |
|
39 | 41 | @if $partial {
|
40 |
| - display: inline-block; |
41 |
| - /*** icon - partial ***/ |
42 |
| - // * use !important to prevent issues with browser extensions that change fonts |
43 |
| - font-family: var(--icon-font-family) !important; |
44 |
| - font-style: normal; |
45 |
| - font-variant: normal; |
| 42 | + & { |
| 43 | + display: inline-block; |
| 44 | + /*** icon - partial ***/ |
| 45 | + // * use !important to prevent issues with browser extensions that change fonts |
| 46 | + font-family: var(--icon-font-family) !important; |
| 47 | + font-style: normal; |
| 48 | + font-variant: normal; |
46 | 49 |
|
47 |
| - font-weight: normal; // CSS variables fallback |
48 |
| - font-weight: var(--icon-font-weight, normal); |
49 |
| - line-height: 1; |
50 |
| - text-transform: none; |
51 |
| - vertical-align: middle; |
| 50 | + font-weight: normal; // CSS variables fallback |
| 51 | + font-weight: var(--icon-font-weight, normal); |
| 52 | + line-height: 1; |
| 53 | + text-transform: none; |
| 54 | + vertical-align: middle; |
52 | 55 |
|
53 |
| - /* stylelint-disable */ |
54 |
| - // * Better Font Rendering =========== |
55 |
| - -webkit-font-smoothing: antialiased; |
56 |
| - -moz-osx-font-smoothing: grayscale; |
57 |
| - /* stylelint-enable */ |
| 56 | + /* stylelint-disable */ |
| 57 | + // * Better Font Rendering =========== |
| 58 | + -webkit-font-smoothing: antialiased; |
| 59 | + -moz-osx-font-smoothing: grayscale; |
| 60 | + /* stylelint-enable */ |
58 | 61 |
|
59 |
| - // Hiding icon from screenreaders |
60 |
| - /* stylelint-disable */ |
61 |
| - -webkit-alt: ""; |
62 |
| - /* stylelint-enable */ |
63 |
| - alt: ""; |
64 |
| - speak: none; // Hiding icon from screenreaders, fallback by older notation |
65 |
| - speak: never; // Hiding icon from screenreaders |
| 62 | + // Hiding icon from screenreaders |
| 63 | + /* stylelint-disable */ |
| 64 | + -webkit-alt: ""; |
| 65 | + /* stylelint-enable */ |
| 66 | + alt: ""; |
| 67 | + speak: none; // Hiding icon from screenreaders, fallback by older notation |
| 68 | + speak: never; // Hiding icon from screenreaders |
| 69 | + } |
66 | 70 | @media aural {
|
67 | 71 | content: none;
|
68 | 72 | }
|
|
77 | 81 |
|
78 | 82 | // SCSS mixin for elements that text should get hidden in favour of only displaying the included icon
|
79 | 83 | @mixin is-icon-text-replace($position: "before") {
|
80 |
| - font-size: 0; |
| 84 | + & { |
| 85 | + font-size: 0; |
| 86 | + } |
81 | 87 |
|
82 | 88 | @if $position == "before" {
|
83 | 89 | &::before {
|
|
0 commit comments