-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
style.scss
124 lines (108 loc) · 2.94 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
.edit-post-meta-boxes-main {
filter: drop-shadow(0 -1px rgba($color: #000, $alpha: 0.133)); // 0.133 = $gray-200 but with alpha.
// Windows High Contrast mode will show this outline, but not the shadow.
outline: 1px solid transparent;
background-color: $white;
display: flex;
flex-direction: column;
overflow: hidden;
&.is-resizable {
padding-block-start: $grid-unit-30;
}
}
.edit-post-meta-boxes-main__presenter {
display: flex;
box-shadow: 0 $border-width $gray-300;
// Windows High Contrast mode will show this outline, but not the shadow.
outline: 1px solid transparent;
position: relative;
z-index: 1;
// Button style reset for both toggle or resizable.
.is-toggle-only > &,
.is-resizable.edit-post-meta-boxes-main & > button {
appearance: none;
padding: 0;
border: none;
outline: none;
background-color: transparent;
}
.is-toggle-only > & {
flex-shrink: 0;
cursor: pointer;
height: $button-size-compact;
justify-content: space-between;
align-items: center;
padding-inline: $grid-unit-30 $grid-unit-15;
&:is(:hover, :focus-visible) {
color: var(--wp-admin-theme-color);
}
&:focus-visible::after {
content: "";
position: absolute;
inset: var(--wp-admin-border-width-focus);
@include button-style__focus();
}
> svg {
fill: currentColor;
}
}
.is-resizable.edit-post-meta-boxes-main & {
inset: 0 0 auto;
> button {
cursor: inherit;
width: $grid-unit-80;
height: $grid-unit-30;
margin: auto;
&::before {
content: "";
background-color: $gray-300;
// Windows High Contrast mode will show this outline, but not the background-color.
outline: 2px solid transparent;
outline-offset: -2px;
position: absolute;
inset-block: calc(50% - #{$grid-unit-05} / 2) auto;
transform: translateX(-50%);
width: inherit;
height: $grid-unit-05;
border-radius: $radius-small;
transition: width 0.3s ease-out;
@include reduce-motion("transition");
}
}
&:is(:hover, :focus-within) > button::before {
background-color: var(--wp-admin-theme-color);
width: $grid-unit-80 + $grid-unit-20;
}
}
}
@media (pointer: coarse) {
.is-resizable.edit-post-meta-boxes-main {
padding-block-start: $button-size-compact;
.edit-post-meta-boxes-main__presenter > button {
height: $button-size-compact;
}
}
}
.edit-post-meta-boxes-main__liner {
overflow: auto;
// Keep the contents behind the resize handle or details summary.
isolation: isolate;
}
// In case the canvas is not iframe’d.
.edit-post-layout__metaboxes {
clear: both;
}
.has-metaboxes .editor-visual-editor {
// Contains z-indexes of children so that the block toolbar will appear behind
// the drop shadow of the meta box pane.
isolation: isolate;
}
// Adjust the position of the notices
.components-editor-notices__snackbar {
position: fixed;
right: 0;
bottom: 24px;
padding-left: 24px;
padding-right: 24px;
}
@include editor-left(".edit-post-layout .components-editor-notices__snackbar");