-
Notifications
You must be signed in to change notification settings - Fork 4k
/
style.scss
139 lines (118 loc) · 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
132
133
134
135
136
137
138
139
.edit-post-header-toolbar {
display: inline-flex;
align-items: center;
border: none;
// Hide all action buttons except the inserter on mobile.
> .components-button {
display: none;
@include break-small() {
display: inline-flex;
}
}
> .edit-post-header-toolbar__inserter-toggle {
display: inline-flex;
}
// Hide table of contents and block navigation on mobile.
.block-editor-block-navigation {
display: none;
@include break-small() {
display: flex;
}
}
// The Toolbar component adds different styles to buttons, so we reset them
// here to the original button styles
> .components-button.has-icon,
> .components-dropdown > .components-button.has-icon {
height: $button-size;
min-width: $button-size;
padding: 6px;
&.is-pressed {
background: $gray-900;
}
&:focus:not(:disabled) {
box-shadow: 0 0 0 $border-width-focus var(--wp-admin-theme-color), inset 0 0 0 $border-width $white;
outline: 1px solid transparent;
}
&::before {
display: none;
}
}
}
// Block toolbar when fixed to the top of the screen.
.edit-post-header-toolbar__block-toolbar {
// Stack toolbar below Editor Bar.
position: absolute;
top: $header-height + $border-width;
left: 0;
right: 0;
background: $white;
border-bottom: $border-width solid $gray-200;
&:empty {
display: none;
}
.block-editor-block-toolbar .components-toolbar-group,
.block-editor-block-toolbar .components-toolbar {
border-top: none;
border-bottom: none;
}
.is-sidebar-opened & {
display: none;
}
@include break-medium {
.is-sidebar-opened & {
display: block;
right: $sidebar-width;
}
}
// Move toolbar into top Editor Bar.
@include break-wide {
padding-left: $grid-unit-10;
position: static;
left: auto;
right: auto;
background: none;
border-bottom: none;
.is-sidebar-opened & {
right: auto;
}
.block-editor-block-toolbar {
border-left: $border-width solid $gray-200;
}
.block-editor-block-toolbar .components-toolbar-group,
.block-editor-block-toolbar .components-toolbar {
$top-toolbar-padding: ($header-height - $grid-unit-60) / 2;
height: $header-height;
padding: $top-toolbar-padding 0;
}
}
}
.edit-post-header-toolbar .edit-post-header-toolbar__inserter-toggle.has-icon {
margin-right: $grid-unit-10;
// Special dimensions for this button.
min-width: 32px;
width: 32px;
height: 32px;
padding: 0;
}
.show-icon-labels {
// Always display block toolbar under main toolbar when text labels are visible
.edit-post-header-toolbar__block-toolbar {
@include break-wide {
position: absolute;
top: $header-height + $border-width;
left: 0;
right: 0;
border-bottom: $border-width solid $gray-200;
padding: 0;
background-color: $white;
.block-editor-block-toolbar .components-toolbar-group,
.block-editor-block-toolbar .components-toolbar {
height: auto;
padding: 0;
}
}
}
.edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle.edit-post-header-toolbar__inserter-toggle {
height: 36px;
}
}