-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
style.scss
92 lines (78 loc) · 2.03 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
.components-menu-item__button,
.components-menu-item__button.components-button {
width: 100%;
&[role="menuitemradio"],
&[role="menuitemcheckbox"] {
.components-menu-item__item:only-child {
// Ensure unchecked items have clearance for consistency
// with checked items containing an icon or shortcut.
padding-right: $grid-unit-60;
box-sizing: initial;
}
}
.components-menu-items__item-icon {
display: inline-block;
flex: 0 0 auto;
&.has-icon-right {
margin-right: -2px; // This optically balances the icon.
margin-left: $grid-unit-30;
}
}
.components-menu-item__shortcut + .components-menu-items__item-icon.has-icon-right {
margin-left: $grid-unit-10;
}
// If a block item is shown inline (such as transforms), space it correctly.
.block-editor-block-icon {
margin-left: -2px; // This optically balances the icon.
margin-right: $grid-unit-10;
}
&.is-primary {
justify-content: center;
.components-menu-item__item {
// Override the default right margin.
margin-right: 0;
}
}
&:disabled,
&[aria-disabled="true"] {
// Override the button component's tertiary background and color.
&.is-tertiary {
background: none;
color: $components-color-accent-darker-10;
opacity: 0.3;
}
}
}
.components-menu-item__info-wrapper {
display: flex;
flex-direction: column;
margin-right: auto;
}
.components-menu-item__info {
margin-top: $grid-unit-05;
font-size: $helptext-font-size;
color: $gray-700;
white-space: normal;
}
.components-menu-item__item {
// Provide a minimum width for text items in menus.
white-space: nowrap;
min-width: 160px;
margin-right: auto;
display: inline-flex;
align-items: center;
}
.components-menu-item__shortcut {
align-self: center;
margin-right: 0;
margin-left: auto;
padding-left: $grid-unit-30;
color: currentColor;
// Hide the keyboard shortcuts on mobile, because they aren't super-useful
// for most mobile users and it frees up screen space for any item
// with a long description.
display: none;
@include break-mobile() {
display: inline;
}
}