wp-optimize
/
vendor
/
team-updraft
/
common-libs
/
src
/
updraft-theme
/
components
/
icon
/
icon.scss
icon.scss in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.7.0, at vendor/team-updraft/common-libs/src/updraft-theme/components/icon/icon.scss
| 1 | @use "../../helpers/responsive-variables-generator.scss" as *; |
| 2 | |
| 3 | $icon-variables: ( |
| 4 | "extra-extra-large": ( |
| 5 | "mobile": "bu-64", |
| 6 | "desktop": "bu-64" |
| 7 | ), |
| 8 | "extra-large": ( |
| 9 | "mobile": "bu-48", |
| 10 | "desktop": "bu-48" |
| 11 | ), |
| 12 | "large": ( |
| 13 | "mobile": "bu-32", |
| 14 | "desktop": "bu-32" |
| 15 | ), |
| 16 | "medium": ( |
| 17 | "mobile": "bu-24", |
| 18 | "desktop": "bu-24" |
| 19 | ), |
| 20 | "small": ( |
| 21 | "mobile": "bu-20", |
| 22 | "desktop": "bu-20" |
| 23 | ), |
| 24 | "extra-small": ( |
| 25 | "mobile": "bu-18", |
| 26 | "desktop": "bu-18" |
| 27 | ), |
| 28 | "extra-extra-small": ( |
| 29 | "mobile": "bu-16", |
| 30 | "desktop": "bu-16" |
| 31 | ) |
| 32 | ); |
| 33 | |
| 34 | @include tu-generate-responsive-variables("tu-icon", $icon-variables); |
| 35 | |
| 36 | |
| 37 | tu-icon { |
| 38 | $self: &; |
| 39 | display: flex; |
| 40 | flex-direction: row; |
| 41 | justify-content: center; |
| 42 | align-items: center; |
| 43 | |
| 44 | &::before { |
| 45 | --tu-icon-size: var(--tu-icon-extra-large); |
| 46 | content: ""; |
| 47 | display: block; |
| 48 | width: var(--tu-icon-size); |
| 49 | height: var(--tu-icon-size); |
| 50 | } |
| 51 | |
| 52 | &:not([color="original"])::before { |
| 53 | mask-image: url('./components/icon/svgs/right.svg'); |
| 54 | mask-size: contain; |
| 55 | mask-repeat: no-repeat; |
| 56 | mask-position: center; |
| 57 | background: var(--color-secondary-500); |
| 58 | } |
| 59 | |
| 60 | &[color="original"]="original""]::before { |
| 61 | background-image: url('./components/icon/svgs/right.svg'); |
| 62 | background-size: contain; |
| 63 | background-repeat: no-repeat; |
| 64 | background-position: center; |
| 65 | } |
| 66 | |
| 67 | $icon-size-map: ( |
| 68 | "xxl": "extra-extra-large", |
| 69 | "xl": "extra-large", |
| 70 | "l": "large", |
| 71 | "m": "medium", |
| 72 | "s": "small", |
| 73 | "xs": "extra-small", |
| 74 | "xxs": "extra-extra-small" |
| 75 | ); |
| 76 | |
| 77 | @each $abbr, $name in $icon-size-map { |
| 78 | &[size="#{$abbr}"]="#{$abbr}""]::before { |
| 79 | --tu-icon-size: var(--tu-icon-#{$name}); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | $icons: ( |
| 84 | left, |
| 85 | check, |
| 86 | info, |
| 87 | minus, |
| 88 | right, |
| 89 | click, |
| 90 | up, |
| 91 | down, |
| 92 | "teamupdraft-logos/wp-optimize", |
| 93 | ); |
| 94 | |
| 95 | @each $icon in $icons { |
| 96 | &[instance="#{$icon}"]="#{$icon}""]:not([color="original"])::before { |
| 97 | mask-image: url('./components/icon/svgs/#{$icon}.svg'); |
| 98 | } |
| 99 | |
| 100 | &[instance="#{$icon}"]="#{$icon}""][color="original"]="original""]::before { |
| 101 | background-image: url('./components/icon/svgs/#{$icon}.svg'); |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 |