_radio-button-bar.scss
1.39 KB
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
@import "../../css/forms";
.ame-radio-button-bar-control {
display: flex;
flex-direction: row;
input[type="radio"], input[type="checkbox"] {
@include ame-visually-hide-input;
}
> label {
display: inline-block;
}
//Selected option. Emulates the default .active style for buttons.
input[type="radio"]:checked ~ .button {
background-color: #dcdcde;
color: #135e96;
border-color: #0a4b78;
box-shadow: inset 0 2px 5px -3px #0a4b78;
z-index: 1;
}
> .ame-radio-bar-item:not(:first-child) > .button {
margin-left: -1px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
> .ame-radio-bar-item:not(:last-child) > .button {
margin-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
//If the input is disabled, make the button look disabled too.
input[type="radio"]:disabled ~ .button {
color: #a7aaad;
border-color: #dcdcde;
background: #f6f7f7;
box-shadow: none;
cursor: default;
}
.ame-radio-bar-button {
display: flex;
align-items: center;
&.ame-rb-has-label {
.dashicons {
margin-right: 0.2em;
}
}
//Unfortunately, Dashicons are not all the same size. Let's resize some
//individual icons to make them look more consistent.
.dashicons-image-rotate {
font-size: 17px;
line-height: 17px;
height: 16px;
}
.dashicons-no, .dashicons-no-alt {
font-size: 22px;
line-height: 22px;
height: 22px;
}
}
}