-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
style.scss
141 lines (117 loc) · 3.07 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
.components-placeholder.components-placeholder { // This needs specificity to override individual block styles.
position: relative;
margin-bottom: $default-block-margin;
padding: 1em;
min-height: 200px;
width: 100%;
text-align: left;
// IE11 doesn't read rules inside this query. They are applied only to modern browsers.
@supports (position: sticky) {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}
// Use opacity to work in various editor styles.
background: $dark-opacity-light-200;
.is-dark-theme & {
background: $light-opacity-light-200;
}
.components-base-control__label {
font-size: $default-font-size;
}
}
.components-placeholder__error,
.components-placeholder__instructions,
.components-placeholder__label,
.components-placeholder__fieldset {
font-family: $default-font;
font-size: $default-font-size;
}
.components-placeholder__label {
display: flex;
font-weight: 600;
margin-bottom: 1em;
> svg,
.dashicon,
.block-editor-block-icon {
fill: currentColor;
margin-right: 1ch;
}
}
.components-placeholder__fieldset,
.components-placeholder__fieldset form {
display: flex;
flex-direction: row;
width: 100%;
flex-wrap: wrap;
z-index: z-index(".components-placeholder__fieldset");
p {
font-family: $default-font;
font-size: $default-font-size;
}
}
.components-placeholder__fieldset.is-column-layout,
.components-placeholder__fieldset.is-column-layout form {
flex-direction: column;
}
.components-placeholder__input {
margin: 0 8px 0 0;
flex: 1 1 auto;
}
.components-placeholder__instructions {
margin-bottom: 1em;
}
.components-placeholder__error {
margin-top: 1em;
width: 100%;
}
.components-placeholder__preview img {
margin: 3%;
width: 50%;
}
.components-placeholder__fieldset .components-button {
margin-right: $grid-size;
margin-bottom: $grid-size; // If buttons wrap we need vertical space between.
&:last-child {
margin-bottom: 0;
margin-right: 0;
}
}
// Any `<Button />` component with `isLink` prop will need extra spacing if placed
// immediately after a button which is *not* an `isLink` style button. This is because
// `isLink` has no padding so we need to account for this to avoid the buttons butting
// up against each other. If it's the last item we don't need a right margin.
.components-placeholder__fieldset .components-button:not(.is-link) ~ .components-button.is-link {
margin-left: 10px; // equal to standard button inner padding
margin-right: 10px; // equal to standard button inner padding
&:last-child {
margin-right: 0;
}
}
// Element queries to show different layouts at various sizes.
.components-placeholder {
// Medium and small sizes.
&.is-medium,
&.is-small {
.components-placeholder__instructions {
display: none;
}
.components-placeholder__fieldset,
.components-placeholder__fieldset form {
flex-direction: column;
}
.components-placeholder__fieldset .components-button {
margin-right: auto;
}
}
// Small sizes.
&.is-small {
.block-editor-block-icon {
display: none;
}
.components-button {
padding: 0 $grid-size 2px;
}
}
}