UNPKG

935 BSCSSView Raw
1@use 'theme' as *;
2/*
3 Global Mixins
4*/
5
6/*
7 Mixin that returns a property map as a series of CSS class properties.
8
9 E.g. $xs: (color: #fff, opacity: 0.5), $sm... =>
10
11 <class>--xs {
12 color: #fff;
13 opacity: 0.5;
14 }
15*/
16@mixin explode-properties($property-map) {
17 @each $property, $value in $property-map {
18 #{$property}: #{$value};
19 }
20}
21
22@mixin input-success {
23 border-color: $cirrus-success;
24
25 &:focus {
26 box-shadow: 0 0 0 0.2rem transparentize($cirrus-success, 1 - $focus-opacity), inset 0px 1px 8px rgba(0, 0, 0, 0.07);
27 }
28}
29
30@mixin input-error {
31 border-color: $cirrus-danger;
32
33 &:focus {
34 box-shadow: 0 0 0 0.2rem transparentize($cirrus-danger, 1 - $focus-opacity), inset 0px 1px 8px rgba(0, 0, 0, 0.07);
35 }
36}
37
38/*
39 Bring to front on focus.
40*/
41@mixin elevate-on-focus {
42 &:focus {
43 z-index: 1;
44 }
45}
\No newline at end of file