forked from Brightspace/valence-ui-input
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkbox-radio.scss
81 lines (69 loc) · 1.51 KB
/
checkbox-radio.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@import 'bower_components/d2l-colors/d2l-colors.scss';
@import 'bower_components/vui-focus/focus.scss';
@mixin _vui-input-checkbox-radio-label(
$type,
$padding-right: 0
) {
display: inline-block;
padding-left: 1.7rem;
padding-right: $padding-right;
vertical-align: middle;
& > input[type="#{$type}"] {
margin-top: -0.2rem;
margin-right: 0.5rem;
margin-left: -1.7rem;
}
[dir="rtl"] & {
padding-right: 1.7rem;
padding-left: $padding-right;
& > input[type="#{$type}"] {
margin-left: 0.5rem;
margin-right: -1.7rem;
}
}
&:last-of-type {
margin-bottom: 0.5rem;
}
}
@mixin _vui-input-legacy-outline() {
outline: 2px solid $d2l-color-celestine-light-2;
}
@mixin _vui-input-checkbox-radio-helper(
$appearance,
$background-image-checked,
$border-radius
) {
@include vui-input(
$background-color: $d2l-color-woolonardo,
$background-color-hover: $d2l-color-gypsum,
$border-radius: $border-radius,
$box-shadow: none,
$has-text: false,
$height: 1.2rem,
$padding: 0,
$padding-focus: 0,
$width: 1.2rem
);
appearance: none;
background-position: center center;
background-repeat: no-repeat;
&:checked {
background-image: $background-image-checked;
}
/* Firefox only */
/* https://bugzilla.mozilla.org/show_bug.cgi?id=605985 */
@-moz-document url-prefix() {
& {
appearance: $appearance;
}
&:focus {
@include _vui-input-legacy-outline();
}
}
/* IE (not Edge) only */
@media screen and (min-width:0\0) {
&:focus {
@include _vui-input-legacy-outline();
}
}
}