PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.4.0
GenerateBlocks v1.4.0
trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.3.0
generateblocks / src / blocks / grid / editor.scss
generateblocks / src / blocks / grid Last commit date
css 5 years ago attributes.js 4 years ago block.js 4 years ago deprecated.js 5 years ago edit.js 4 years ago editor.scss 5 years ago
editor.scss
209 lines
1 // Styles from core Columns block
2 // https://github.com/WordPress/gutenberg/blob/master/blocks/library/columns/editor.scss
3 .gb-grid-wrapper {
4 position: relative;
5 display: block;
6 // These margins make sure that nested blocks stack/overlay with the parent block chrome
7 // This is sort of an experiment at making sure the editor looks as much like the end result as possible
8 // Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere
9 margin-right: 0;
10 margin-left: 0;
11
12 > .block-editor-inner-blocks > .block-editor-block-list__layout {
13 position: relative;
14 display: flex;
15 flex-wrap: wrap;
16 justify-content: flex-start;
17 margin-right: -15px;
18 margin-left: -15px;
19
20 // This max-width is used to constrain the main editor column, it should not cascade into columns
21 .editor-block-list__block {
22 max-width: none;
23 margin-right: 0;
24 margin-left: 0;
25 }
26 }
27
28 // Fullwide: show margin left/right to ensure there's room for the side UI
29 // This is not a 1:1 preview with the front-end where these margins would presumably be zero
30 // @todo this could be revisited, by for example showing this margin only when the parent block was selected first
31 // Then at least an unselected columns block would be an accurate preview
32 .block-editor-block-list__block[data-align="full"]="full""][data-type="generateblocks/grid"]="generateblocks/grid""] > .block-editor-block-list__block-edit > div > & {
33 > .gb-grid-wrapper-button-select {
34 right: 1px;
35 }
36 > .block-editor-inner-blocks > .block-editor-block-list__layout {
37 margin-right: 1px;
38 margin-left: 1px;
39 }
40 }
41
42 // Hide appender shortcuts in columns
43 // @todo This essentially duplicates the mobile styles for the appender component
44 // It would be nice to be able to use element queries in that component instead https://github.com/tomhodgins/element-queries-spec
45 .editor-inserter-with-shortcuts {
46 display: none;
47 }
48 .editor-block-list__empty-block-inserter,
49 .editor-default-block-appender .editor-inserter {
50 right: 10px;
51 left: auto;
52 }
53 }
54
55 .wp-block.gb-col {
56 margin-top: 29px;
57 }
58
59 // Layouts selector.
60 .components-placeholder.components-placeholder.gb-select-layout {
61 padding: 25px;
62 background: #fff;
63 color: #000;
64
65 .components-placeholder__fieldset > em {
66 margin-bottom: 25px;
67 }
68
69 .gb-grid-wrapper-layout-preview {
70 display: flex;
71 flex-wrap: wrap;
72 justify-content: center;
73 margin-right: -7px;
74 margin-left: -7px;
75
76 .gb-grid-wrapper-layout-preview-btn {
77 display: flex;
78 flex-wrap: wrap;
79 width: 85px;
80 padding: 0;
81 margin-right: 7px;
82 margin-bottom: 14px;
83 margin-left: 7px;
84 overflow: hidden;
85 cursor: pointer;
86 background: none;
87 border: 2px solid rgba(#4f5969, .75);
88 border-radius: 4px;
89 transition: .15s border-color, .15s background-color;
90
91 .gb-col {
92 height: 40px;
93 border-right: 2px solid rgba(#4f5969, .75);
94 transition: .15s border-color;
95
96 &:last-of-type {
97 border-right: none;
98 }
99 }
100
101 &:hover,
102 &:focus {
103 background-color: #fff;
104 border-color: #4f5969;
105
106 .gb-col {
107 border-color: #4f5969;
108 }
109 }
110 }
111 }
112
113 // templates button.
114 .components-button.is-primary {
115 height: 35px;
116 padding: 0 15px;
117 margin-top: 10px;
118 font-size: 14px;
119 }
120 }
121
122 .gb-col {
123 display: flex;
124 flex: 1;
125 flex-direction: column;
126 width: 0;
127
128 > .block-editor-block-list__block-edit {
129 display: flex;
130 flex-basis: 100%;
131 // stylelint-disable-next-line
132 margin-top: 0 !important;
133 // stylelint-disable-next-line
134 margin-bottom: 0 !important;
135
136 > [data-block]] {
137 flex: 100%;
138 }
139
140 // fix selected column block content position.
141 > .editor-block-contextual-toolbar + [data-block]] {
142 margin-left: 30px;
143 }
144 }
145 }
146
147 .gb-col.gb-col-25 {
148 flex-basis: 25%;
149 }
150
151 .gb-col.gb-col-75 {
152 flex-basis: 75%;
153 }
154
155 .gb-col.gb-col-50 {
156 flex-basis: 50%;
157 }
158
159 .gb-col.gb-col-60 {
160 flex-basis: 60%;
161 }
162
163 .gb-col.gb-col-20 {
164 flex-basis: 20%;
165 }
166
167 .gb-col.gb-col-16 {
168 flex-basis: 16.6%;
169 }
170
171 .gb-grid-appender button {
172 background: #fff;
173 box-shadow: inset 0 0 0 1px #555d66, inset 0 0 0 2px #fff;
174 padding: 20px;
175 width: 100%;
176 justify-content: center;
177 height: auto;
178 }
179
180 .gb-grid-appender button.components-button svg {
181 margin-right: 0;
182 }
183
184 .gb-select-layout .components-placeholder__label,
185 .gb-select-layout .components-placeholder__instructions {
186 margin-left: auto;
187 margin-right: auto;
188 }
189
190 .gb-select-layout iframe {
191 display: flex;
192 justify-content: center;
193 align-items: center;
194 }
195
196 .gb-select-layout .gb-grid-wrapper-layout-preview {
197 max-width: 500px;
198 }
199
200 .gb-select-layout .components-placeholder__fieldset {
201 display: flex;
202 justify-content: center;
203 }
204
205 .wp-block[data-type="generateblocks/grid"]="generateblocks/grid""] {
206 margin-top: 0;
207 margin-bottom: 0;
208 }
209