selfprivacy.org/_vendor/github.com/google/docsy/assets/scss/support/_mixins.scss

56 lines
964 B
SCSS
Raw Normal View History

2024-04-25 22:15:39 +00:00
// Mixins
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
@mixin link-decoration($base: none, $focus_or_hover: initial) {
a {
text-decoration: $base;
&:focus,
&:hover {
text-decoration: $focus_or_hover;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
}
.btn-link {
text-decoration: $base;
}
2024-04-21 23:04:16 +00:00
}
@mixin link-variant($parent, $color, $hover-color, $underline: false) {
2024-04-25 22:15:39 +00:00
#{$parent} {
color: $color;
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
&:hover {
color: $hover-color;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
@if $underline {
text-decoration: underline;
2024-04-21 23:04:16 +00:00
}
2024-04-25 22:15:39 +00:00
}
2024-04-21 23:04:16 +00:00
}
@mixin optional-at-root($sel) {
2024-04-25 22:15:39 +00:00
@at-root #{if(not &, $sel, selector-append(&, $sel))} {
@content;
}
2024-04-21 23:04:16 +00:00
}
// placeholder allows styling of the placeholder used in search input etc.
@mixin placeholder {
2024-04-25 22:15:39 +00:00
@include optional-at-root("::-webkit-input-placeholder") {
@content;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
@include optional-at-root(":-moz-placeholder") {
@content;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
@include optional-at-root("::-moz-placeholder") {
@content;
}
2024-04-21 23:04:16 +00:00
2024-04-25 22:15:39 +00:00
@include optional-at-root(":-ms-input-placeholder") {
@content;
}
2024-04-21 23:04:16 +00:00
}