/
editor.scss
148 lines (124 loc) · 2.93 KB
/
editor.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
ul.wp-block-gallery {
// Override the default list style type _only in the editor_
// to avoid :not() selector specificity issues.
// See https://github.com/WordPress/gutenberg/pull/10358
li {
list-style-type: none;
}
// Override the bottom margin every block gets.
.is-selected & {
margin-bottom: 0;
}
}
.blocks-gallery-item {
// Hide the focus outline that otherwise briefly appears when selecting a block.
figure:not(.is-selected):focus {
outline: none;
}
figure.is-selected {
outline: 4px solid theme(primary);
}
figure.is-transient img {
opacity: 0.3;
}
.block-editor-rich-text {
position: absolute;
bottom: 0;
width: 100%;
max-height: 100%;
overflow-y: auto;
}
.is-selected .block-editor-rich-text {
// IE calculates this incorrectly, so leave it to modern browsers.
@supports (position: sticky) {
right: 0;
left: 0;
margin-top: -4px;
}
// Override negative margins so this toolbar isn't hidden by overflow. Overflow is needed for long captions.
.block-editor-rich-text__inline-toolbar {
top: 0;
}
// Make extra space for the inline toolbar.
figcaption {
padding-top: 48px;
}
}
.is-selected .block-library-gallery-item__move-menu,
.is-selected .block-library-gallery-item__inline-menu {
background: $white;
border: 1px solid $dark-opacity-light-800;
border-radius: $radius-round-rectangle;
transition: box-shadow 0.2s ease-out;
@include reduce-motion("transition");
&:hover {
box-shadow: $shadow-toolbar;
}
.components-button {
color: $dark-opacity-300;
padding: 2px;
height: $icon-button-size-small;
// Remove hover box shadows, since they clash with the container.
&:not(:disabled):not([aria-disabled="true"]):not(.is-default):hover {
box-shadow: none;
}
@include break-small() {
// Use smaller buttons to fit when there are many columns.
.columns-7 &,
.columns-8 & {
padding: 0;
width: inherit;
height: inherit;
}
}
}
.components-button:focus {
color: inherit;
}
}
.block-editor-rich-text figcaption {
position: relative;
overflow: hidden;
a {
color: $white;
}
}
}
.block-library-gallery-item__move-menu,
.block-library-gallery-item__inline-menu {
margin: $grid-size;
display: inline-flex;
z-index: z-index(".block-library-gallery-item__inline-menu");
.components-button {
color: transparent;
}
@include break-small() {
// Use smaller buttons to fit when there are many columns.
.columns-7 &,
.columns-8 & {
padding: $grid-size-small / 2;
}
}
}
.block-library-gallery-item__inline-menu {
position: absolute;
top: -2px;
right: -2px;
}
.block-library-gallery-item__move-menu {
position: absolute;
top: -2px;
left: -2px;
}
.blocks-gallery-item__move-backward,
.blocks-gallery-item__move-forward,
.blocks-gallery-item__remove {
padding: 0;
}
.blocks-gallery-item .components-spinner {
position: absolute;
top: 50%;
left: 50%;
margin-top: -9px;
margin-left: -9px;
}