-
Notifications
You must be signed in to change notification settings - Fork 4k
/
style.scss
131 lines (110 loc) · 2.3 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// dirty hack to clean up modal
.commands-command-menu {
width: 100%;
max-width: 420px;
position: relative;
top: 15%;
.components-modal__content {
margin: 0;
padding: 0;
}
}
.commands-command-menu__overlay {
display: block;
align-items: start;
}
.commands-command-menu__header {
display: flex;
align-items: center;
padding-left: $grid-unit-20;
.components-button {
height: $grid-unit-70;
width: $grid-unit-70;
border: 1px solid $gray-600;
border-right: 0;
justify-content: center;
border-radius: $radius-block-ui 0 0 $radius-block-ui;
& + [cmdk-input] {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}
.commands-command-menu__container {
// the style here is a hack to force safari to repaint to avoid a style glitch
will-change: transform;
[cmdk-input] {
border: none;
width: 100%;
padding: $grid-unit-20 $grid-unit-20 $grid-unit-20 $grid-unit-10;
outline: none;
color: $gray-900;
margin: 0;
font-size: 16px;
line-height: 28px;
border-radius: 0;
&::placeholder {
color: $gray-700;
}
&:focus {
box-shadow: none;
outline: none;
}
}
[cmdk-item] {
border-radius: $grid-unit-05;
cursor: pointer;
display: flex;
align-items: center;
padding: $grid-unit;
color: $gray-900;
font-size: $default-font-size;
&[aria-selected="true"],
&:active {
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
color: var(--wp-admin-theme-color);
svg {
fill: var(--wp-admin-theme-color);
}
}
&[aria-disabled="true"] {
color: $gray-600;
cursor: not-allowed;
}
svg {
fill: $gray-900;
}
}
[cmdk-root] > [cmdk-list] {
max-height: 368px; // Specific to not have commands overflow oddly.
overflow: auto;
& > [cmdk-list-sizer]:not(:empty) {
padding: 0 $grid-unit $grid-unit;
}
}
[cmdk-empty] {
display: flex;
align-items: center;
justify-content: center;
height: $grid-unit-80;
white-space: pre-wrap;
color: $gray-900;
}
[cmdk-loading] {
padding: $grid-unit-20;
}
[cmdk-list-sizer] {
position: relative;
}
}
.commands-command-menu__item span {
// Ensure commands do not run off the edge (great for post titles).
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.commands-command-menu__item mark {
color: inherit;
background: unset;
}