File tree 4 files changed +67
-1
lines changed
4 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 36
36
map [is = "web-map" ]: not (: defined ) > : not (area ): not (.mapml-web-map ) {
37
37
display : none;
38
38
}
39
+
40
+ /* Pre-style to avoid Layout Shift. */
41
+ map [is = "web-map" ]: not (: defined ) {
42
+ display : inline-block;
43
+ contain : size;
44
+ contain-intrinsic-size : 304px 154px ;
45
+ }
46
+
39
47
/* Ensure inline layer content is hidden if custom/built-in elements isn't
40
48
supported, or if javascript is disabled. This needs to be defined separately
41
49
from the above, because the `:not(:defined)` selector invalidates the entire
51
59
map [is = "web-map" ]: not (: defined ) + img [usemap ] {
52
60
display : initial;
53
61
}
62
+
63
+ /* "Reset" the properties used to pre-style (to avoid Layout Shift) if
64
+ custom/built-in elements is supported but javascript is disabled. */
65
+ map [is = "web-map" ]: not (: defined ) {
66
+ display : initial;
67
+ contain : initial;
68
+ contain-intrinsic-size : initial;
69
+ }
54
70
</ style >
55
71
</ noscript >
56
72
</ head >
Original file line number Diff line number Diff line change 35
35
mapml-viewer : not (: defined ) > * {
36
36
display : none;
37
37
}
38
+
39
+ /* Pre-style to avoid Layout Shift. */
40
+ mapml-viewer : not (: defined ) {
41
+ display : inline-block;
42
+ contain : size;
43
+ contain-intrinsic-size : 304px 154px ;
44
+ }
45
+
38
46
/* Ensure inline layer content is hidden if custom/built-in elements isn't
39
47
supported, or if javascript is disabled. This needs to be defined separately
40
48
from the above, because the `:not(:defined)` selector invalidates the entire
50
58
mapml-viewer : not (: defined ) > : not (layer- ) {
51
59
display : initial;
52
60
}
61
+
62
+ /* "Reset" the properties used to pre-style (to avoid Layout Shift) if
63
+ custom/built-in elements is supported but javascript is disabled. */
64
+ mapml-viewer : not (: defined ) {
65
+ display : initial;
66
+ contain : initial;
67
+ contain-intrinsic-size : initial;
68
+ }
53
69
</ style >
54
70
</ noscript >
55
71
</ head >
Original file line number Diff line number Diff line change 36
36
map [is = "web-map" ]: not (: defined ) > : not (area ): not (.mapml-web-map ) {
37
37
display : none;
38
38
}
39
+
40
+ /* Pre-style to avoid Layout Shift. */
41
+ map [is = "web-map" ]: not (: defined ) {
42
+ display : inline-block;
43
+ contain : size;
44
+ contain-intrinsic-size : 304px 154px ;
45
+ }
46
+
39
47
/* Ensure inline layer content is hidden if custom/built-in elements isn't
40
48
supported, or if javascript is disabled. This needs to be defined separately
41
49
from the above, because the `:not(:defined)` selector invalidates the entire
51
59
map [is = "web-map" ]: not (: defined ) + img [usemap ] {
52
60
display : initial;
53
61
}
62
+
63
+ /* "Reset" the properties used to pre-style (to avoid Layout Shift) if
64
+ custom/built-in elements is supported but javascript is disabled. */
65
+ map [is = "web-map" ]: not (: defined ) {
66
+ display : initial;
67
+ contain : initial;
68
+ contain-intrinsic-size : initial;
69
+ }
54
70
</ style >
55
71
</ noscript >
56
72
</ head >
Original file line number Diff line number Diff line change 28
28
height : 100% ;
29
29
30
30
/* Remove default (native-like) border. */
31
- /* border: none; */
31
+ border : none;
32
+
33
+ vertical-align : middle;
32
34
}
33
35
34
36
/* Pre-style to avoid FOUC of inline layer- and fallback content. */
35
37
mapml-viewer : not (: defined ) > * {
36
38
display : none;
37
39
}
40
+
41
+ /* Pre-style to avoid Layout Shift. */
42
+ mapml-viewer : not (: defined ) {
43
+ display : inline-block;
44
+ contain : size;
45
+ contain-intrinsic-size : 304px 154px ;
46
+ }
47
+
38
48
/* Ensure inline layer content is hidden if custom/built-in elements isn't
39
49
supported, or if javascript is disabled. This needs to be defined separately
40
50
from the above, because the `:not(:defined)` selector invalidates the entire
50
60
mapml-viewer : not (: defined ) > : not (layer- ) {
51
61
display : initial;
52
62
}
63
+
64
+ /* "Reset" the properties used to pre-style (to avoid Layout Shift) if
65
+ custom/built-in elements is supported but javascript is disabled. */
66
+ mapml-viewer : not (: defined ) {
67
+ display : initial;
68
+ contain : initial;
69
+ contain-intrinsic-size : initial;
70
+ }
53
71
</ style >
54
72
</ noscript >
55
73
</ head >
You can’t perform that action at this time.
0 commit comments