/
style.scss
114 lines (96 loc) · 2.21 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
114
.components-dropdown-menu {
padding: 3px;
display: flex;
.components-dropdown-menu__toggle {
width: auto;
margin: 0;
padding: 4px;
border: $border-width solid transparent;
display: flex;
flex-direction: row;
&.is-active,
&.is-active:hover {
box-shadow: none;
background-color: $dark-gray-500;
color: $white;
}
&:focus::before {
top: -3px;
right: -3px;
bottom: -3px;
left: -3px;
}
&:hover,
&:focus,
&:not(:disabled):not([aria-disabled="true"]):not(.is-default):hover {
@include formatting-button-style__hover();
}
// Add a dropdown arrow indicator.
.components-dropdown-menu__indicator::after {
@include dropdown-arrow();
}
}
}
.components-dropdown-menu__popover .components-popover__content {
width: 200px;
}
.components-dropdown-menu__menu {
width: 100%;
padding: ($grid-size - $border-width) 0;
font-family: $default-font;
font-size: $default-font-size;
line-height: $default-line-height;
.components-dropdown-menu__menu-item,
.components-menu-item {
width: 100%;
padding: 6px;
outline: none;
cursor: pointer;
margin-bottom: $grid-size-small;
&.has-separator {
margin-top: 6px;
position: relative;
overflow: visible;
}
&.has-separator::before {
display: block;
content: "";
box-sizing: content-box;
background-color: $light-gray-500;
position: absolute;
top: -3px;
left: 0;
right: 0;
height: 1px;
}
// Plain menu styles.
&:focus:not(:disabled):not([aria-disabled="true"]):not(.is-default) {
@include menu-style__focus();
}
// Formatting buttons
> svg {
border-radius: $radius-round-rectangle;
// This assumes 20x20px dashicons.
padding: 2px;
width: $icon-button-size-small;
height: $icon-button-size-small;
margin: -1px $grid-size -1px 0;
}
&:not(:disabled):not([aria-disabled="true"]):not(.is-default).is-active > svg {
@include formatting-button-style__active();
}
}
.components-menu-group:not(:last-child) {
border-bottom: $border-width solid $light-gray-500;
}
.components-menu-item__button,
.components-menu-item__button.components-icon-button {
padding-left: 2rem;
&.has-icon {
padding-left: 0.5rem;
}
.dashicon {
margin-right: 4px;
}
}
}