File tree 4 files changed +23
-77
lines changed
4 files changed +23
-77
lines changed Original file line number Diff line number Diff line change @@ -186,31 +186,6 @@ class GridPlate extends LitElement {
186
186
0.5s margin ease-in-out
187
187
);
188
188
}
189
- :host([data-hax-ray]) [data-layout-slotname].not-shown {
190
- display: block;
191
- opacity: 0.4;
192
- width: 0;
193
- }
194
- :host([data-hax-ray]) [data-layout-slotname].not-shown.has-nodes {
195
- width: 100%;
196
- transition: none;
197
- }
198
- :host([data-hax-ray]) .not-shown:hover {
199
- opacity: 1;
200
- }
201
- :host([data-hax-ray]) .not-shown:hover::before {
202
- content: "Hidden bylayout";
203
- position: sticky;
204
- display: inline-flex;
205
- background-color: black;
206
- color: white;
207
- padding: 0px 8px;
208
- font-size: 12px;
209
- line-height: 16px;
210
- margin: 12px 13px;
211
- float: right;
212
- width: 124px;
213
- }
214
189
/** this implies hax editing state is available **/
215
190
:host([data-hax-ray]) div ::slotted(*) {
216
191
border: var(
@@ -327,7 +302,7 @@ class GridPlate extends LitElement {
327
302
this . breakpointMd = 1200 ;
328
303
this . breakpointLg = 1500 ;
329
304
this . breakpointXl = 1800 ;
330
- this . columns = 6 ;
305
+ this . columns = 4 ;
331
306
this . disableResponsive = false ;
332
307
this . layout = "1-1" ;
333
308
this . layouts = new GridPlateLayoutOptions ( ) . layouts ;
Original file line number Diff line number Diff line change @@ -186,31 +186,6 @@ class GridPlate extends LitElement {
186
186
0.5s margin ease-in-out
187
187
);
188
188
}
189
- :host([data-hax-ray]) [data-layout-slotname].not-shown {
190
- display: block;
191
- opacity: 0.4;
192
- width: 0;
193
- }
194
- :host([data-hax-ray]) [data-layout-slotname].not-shown.has-nodes {
195
- width: 100%;
196
- transition: none;
197
- }
198
- :host([data-hax-ray]) .not-shown:hover {
199
- opacity: 1;
200
- }
201
- :host([data-hax-ray]) .not-shown:hover::before {
202
- content: "Hidden bylayout";
203
- position: sticky;
204
- display: inline-flex;
205
- background-color: black;
206
- color: white;
207
- padding: 0px 8px;
208
- font-size: 12px;
209
- line-height: 16px;
210
- margin: 12px 13px;
211
- float: right;
212
- width: 124px;
213
- }
214
189
/** this implies hax editing state is available **/
215
190
:host([data-hax-ray]) div ::slotted(*) {
216
191
border: var(
@@ -327,7 +302,7 @@ class GridPlate extends LitElement {
327
302
this . breakpointMd = 1200 ;
328
303
this . breakpointLg = 1500 ;
329
304
this . breakpointXl = 1800 ;
330
- this . columns = 6 ;
305
+ this . columns = 4 ;
331
306
this . disableResponsive = false ;
332
307
this . layout = "1-1" ;
333
308
this . layouts = new GridPlateLayoutOptions ( ) . layouts ;
Original file line number Diff line number Diff line change @@ -23,31 +23,6 @@ export const HaxLayoutBehaviors = function (SuperClass) {
23
23
0.5s margin ease-in-out
24
24
);
25
25
}
26
- : host ([data-hax-ray ]) [data-layout-slotname ].not-shown {
27
- display : block;
28
- opacity : 0.4 ;
29
- width : 0 ;
30
- }
31
- : host ([data-hax-ray ]) [data-layout-slotname ].not-shown .has-nodes {
32
- width : 100% ;
33
- transition : none;
34
- }
35
- : host ([data-hax-ray ]) .not-shown : hover {
36
- opacity : 1 ;
37
- }
38
- : host ([data-hax-ray ]) .not-shown : hover ::before {
39
- content : "Hidden by layout" ;
40
- position : sticky;
41
- display : inline-flex;
42
- background-color : black;
43
- color : white;
44
- padding : 0px 8px ;
45
- font-size : 12px ;
46
- line-height : 16px ;
47
- margin : 12px 13px ;
48
- float : right;
49
- width : 124px ;
50
- }
51
26
/** this implies hax editing state is available **/
52
27
: host ([data-hax-ray ]) ::slotted (* ) {
53
28
outline : var (--hax-layout-slotted-outline-width , 0px )
Original file line number Diff line number Diff line change @@ -1276,6 +1276,27 @@ class HaxStore extends I18NMixin(winEventsElement(HAXElement(LitElement))) {
1276
1276
if ( e . detail . command && e . detail . command === "removeFormat" ) {
1277
1277
this . activeNode . innerHTML = stripMSWord ( this . activeNode . innerHTML ) ;
1278
1278
}
1279
+ // @todo this will help with keeping styling and slot in some situation
1280
+ // there's still something odd w/ ul/ol in grids that will need explored.
1281
+ if ( e . detail . command && e . detail . command === "formatBlock" ) {
1282
+ let dataset = { ...this . activeNode . dataset } ;
1283
+ let slot = this . activeNode . slot ;
1284
+ // the delay allows HAX to switch the element and insert where it used to be
1285
+ // after which point we can quickly set these prims that get lost otherwise
1286
+ // as this is handled by the browser to do the text editing transform
1287
+ // as opposed to HAX directly like web components get :)
1288
+ setTimeout ( ( ) => {
1289
+ for ( var i in dataset ) {
1290
+ if ( ! i . startsWith ( 'hax' ) ) {
1291
+ this . activeNode . dataset [ i ] = dataset [ i ] ;
1292
+ }
1293
+ }
1294
+ // if it had a slot, ensure we maintain that
1295
+ if ( slot ) {
1296
+ this . activeNode . setAttribute ( 'slot' , slot ) ;
1297
+ }
1298
+ } , 0 ) ;
1299
+ }
1279
1300
}
1280
1301
/**
1281
1302
* Intercept paste event and clean it up before inserting the contents
You can’t perform that action at this time.
0 commit comments