-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
style.scss
113 lines (98 loc) · 1.92 KB
/
style.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
.components-toolbar {
margin: 0;
border: 1px solid $light-gray-500;
background-color: $white;
display: inline-flex;
}
div.components-toolbar {
&> div {
display: inline-flex;
margin: 0;
}
&> div + div {
margin-left: -3px;
&.has-left-divider {
margin-left: 6px;
position: relative;
overflow: visible;
}
&.has-left-divider:before {
display: inline-block;
content: '';
box-sizing: content-box;
background-color: $light-gray-500;
position: absolute;
top: 8px;
left: -3px;
width: 1px;
height: $icon-button-size - 16px;
}
}
}
.components-toolbar__control.components-button {
display: inline-flex;
align-items: flex-end;
margin: 0;
padding: 3px;
outline: none;
cursor: pointer;
position: relative;
width: $icon-button-size;
height: $icon-button-size;
&:disabled {
cursor: default;
}
& > svg {
padding: 5px;
box-sizing: content-box;
border-radius: $button-style__radius-roundrect;
}
// subscript for numbered icon buttons, like headings
&[data-subscript] svg {
padding: 4px 8px 4px 0px;
}
&[data-subscript]:after {
content: attr( data-subscript );
font-family: $default-font;
font-size: $default-font-size;
font-weight: bold;
position: absolute;
right: 8px;
bottom: 8px;
}
// special hover style
&:not(:disabled) {
&.is-active > svg,
&:hover > svg {
box-shadow: inset 0 0 0 1px $dark-gray-500;
}
}
// special active style
&.is-active {
color: $white;
> svg {
background: $dark-gray-500;
}
}
// focus style
&:focus {
outline: none;
box-shadow: none;
background: none;
}
&:focus > svg {
@include button-style__focus-active;
}
&:focus:hover > svg {
@include button-style__focus-active;
}
// active focus style
&.is-active:focus > svg {
background: $dark-gray-500;
color: $white;
box-shadow: inset 0 0 0 1px $dark-gray-500, inset 0 0 0 2px $white;
}
}
.components-toolbar__control .dashicon {
display: block;
}