github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/themes/docsy/assets/scss/support/_mixins.scss (about) 1 // Some simple mixins. 2 3 @mixin bg-gradient-variant($parent, $color,$ignore-warning: false) { 4 #{$parent} { 5 background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 6 } 7 } 8 9 @mixin link-variant($parent, $color, $hover-color, $underline: false) { 10 #{$parent} { 11 color: $color; 12 13 &:hover { 14 color: $hover-color; 15 } 16 17 @if $underline { 18 text-decoration: underline; 19 } 20 } 21 } 22 23 @mixin optional-at-root($sel) { 24 @at-root #{if(not &, $sel, selector-append(&, $sel))} { 25 @content; 26 } 27 } 28 29 // placeholder allows styling of the placeholder used in search input etc. 30 @mixin placeholder { 31 @include optional-at-root("::-webkit-input-placeholder") { 32 @content; 33 } 34 35 36 @include optional-at-root(":-moz-placeholder") { 37 @content; 38 } 39 40 41 @include optional-at-root("::-moz-placeholder") { 42 @content; 43 } 44 45 46 @include optional-at-root(":-ms-input-placeholder") { 47 @content; 48 } 49 }