-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
style.scss
159 lines (136 loc) · 3.37 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// The button element easily inherits styles that are meant for the editor style.
// These rules enhance the specificity to reduce that inheritance.
// This is duplicated in visual-editor.
.edit-site-block-editor__editor-styles-wrapper .components-button {
font-family: $default-font;
font-size: $default-font-size;
padding: 6px 12px;
&.is-tertiary,
&.has-icon {
padding: 6px;
}
}
// Navigation focus mode requires padding around the root Navigation block
// for presentational purposes.
.edit-site-editor-canvas__block-list.is-navigation-block {
padding: $grid-unit-30;
}
.edit-site-visual-editor {
position: relative;
height: 100%;
display: block;
overflow: hidden;
background-color: $gray-900;
// Centralize the editor horizontally (flex-direction is column).
align-items: center;
.edit-site-visual-editor__editor-canvas {
&.is-focused {
outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
}
}
&.is-focus-mode {
.edit-site-layout.is-full-canvas & {
padding: $grid-unit-60;
}
.edit-site-visual-editor__editor-canvas {
border-radius: $radius-block-ui;
max-height: 100%;
}
// To hide the horizontal scrollbar and show the drag handle on the
// left and right of the container.
.components-resizable-box__container {
overflow: visible;
}
}
.components-resizable-box__container {
margin: 0 auto;
// Removing this will cancel the bottom margins in the iframe.
overflow: auto;
}
&.is-view-mode {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 10px -6px rgba(0, 0, 0, 0.8);
}
}
.edit-site-visual-editor__back-button {
position: absolute;
top: $grid-unit-10;
left: $grid-unit-10;
color: $white;
&:active:not([aria-disabled="true"]),
&:focus:not([aria-disabled="true"]),
&:hover {
color: $gray-100;
}
}
// The toolbar header in distraction mode sits over the back button, which renders it unreachable.
.is-distraction-free .edit-site-visual-editor__back-button {
display: none;
}
.resizable-editor__drag-handle {
position: absolute;
top: 0;
bottom: 0;
padding: 0;
margin: auto 0;
width: $grid-unit-15;
appearance: none;
cursor: ew-resize;
outline: none;
background: none;
border-radius: $radius-block-ui;
border: 0;
&.is-variation-default {
height: 100px;
}
&.is-variation-separator {
height: 100%;
width: $grid-unit-30;
right: 0;
&::after {
width: 2px;
border-radius: 0;
background: transparent;
left: 50%;
transform: translateX(-1px);
right: 0;
transition: all ease 0.2s;
transition-delay: 0.1s;
@include reduce-motion;
}
}
&::after {
position: absolute;
top: $grid-unit-30;
left: $grid-unit-05;
right: 0;
bottom: $grid-unit-30;
content: "";
width: $grid-unit-05;
background: $gray-600;
border-radius: $radius-block-ui;
}
&.is-left {
left: -$grid-unit-20;
}
&.is-right {
right: -$grid-unit-20;
}
&:hover,
&:active {
opacity: 1;
&.is-variation-default::after {
background: $gray-400;
}
&.is-variation-separator::after {
background: var(--wp-admin-theme-color);
}
}
&:focus::after {
box-shadow: 0 0 0 1px $gray-800, 0 0 0 calc(var(--wp-admin-border-width-focus) + 1px) var(--wp-admin-theme-color);
}
&.is-variation-separator:focus::after {
border-radius: $radius-block-ui;
box-shadow: inset 0 0 0 2px var(--wp-admin-theme-color);
}
}