PluginProbe ʕ •ᴥ•ʔ
GenerateBlocks / 1.4.4
GenerateBlocks v1.4.4
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 4 years ago
editor.scss
208 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 width: 85px;
79 padding: 0;
80 margin-right: 7px;
81 margin-bottom: 14px;
82 margin-left: 7px;
83 overflow: hidden;
84 cursor: pointer;
85 background: none;
86 border: 2px solid rgba(#4f5969, .75);
87 border-radius: 4px;
88 transition: .15s border-color, .15s background-color;
89
90 .gb-col {
91 height: 40px;
92 border-right: 2px solid rgba(#4f5969, .75);
93 transition: .15s border-color;
94
95 &:last-of-type {
96 border-right: none;
97 }
98 }
99
100 &:hover,
101 &:focus {
102 background-color: #fff;
103 border-color: #4f5969;
104
105 .gb-col {
106 border-color: #4f5969;
107 }
108 }
109 }
110 }
111
112 // templates button.
113 .components-button.is-primary {
114 height: 35px;
115 padding: 0 15px;
116 margin-top: 10px;
117 font-size: 14px;
118 }
119 }
120
121 .gb-col {
122 display: flex;
123 flex: 1;
124 flex-direction: column;
125 width: 0;
126
127 > .block-editor-block-list__block-edit {
128 display: flex;
129 flex-basis: 100%;
130 // stylelint-disable-next-line
131 margin-top: 0 !important;
132 // stylelint-disable-next-line
133 margin-bottom: 0 !important;
134
135 > [data-block]] {
136 flex: 100%;
137 }
138
139 // fix selected column block content position.
140 > .editor-block-contextual-toolbar + [data-block]] {
141 margin-left: 30px;
142 }
143 }
144 }
145
146 .gb-col.gb-col-25 {
147 flex-basis: 25%;
148 }
149
150 .gb-col.gb-col-75 {
151 flex-basis: 75%;
152 }
153
154 .gb-col.gb-col-50 {
155 flex-basis: 50%;
156 }
157
158 .gb-col.gb-col-60 {
159 flex-basis: 60%;
160 }
161
162 .gb-col.gb-col-20 {
163 flex-basis: 20%;
164 }
165
166 .gb-col.gb-col-16 {
167 flex-basis: 16.6%;
168 }
169
170 .gb-grid-appender button {
171 background: #fff;
172 box-shadow: inset 0 0 0 1px #555d66, inset 0 0 0 2px #fff;
173 padding: 20px;
174 width: 100%;
175 justify-content: center;
176 height: auto;
177 }
178
179 .gb-grid-appender button.components-button svg {
180 margin-right: 0;
181 }
182
183 .gb-select-layout .components-placeholder__label,
184 .gb-select-layout .components-placeholder__instructions {
185 margin-left: auto;
186 margin-right: auto;
187 }
188
189 .gb-select-layout iframe {
190 display: flex;
191 justify-content: center;
192 align-items: center;
193 }
194
195 .gb-select-layout .gb-grid-wrapper-layout-preview {
196 max-width: 500px;
197 }
198
199 .gb-select-layout .components-placeholder__fieldset {
200 display: flex;
201 justify-content: center;
202 }
203
204 .wp-block[data-type="generateblocks/grid"]="generateblocks/grid""] {
205 margin-top: 0;
206 margin-bottom: 0;
207 }
208