Skip to content

Commit 7332066

Browse files
committed
Move style tag to header
1 parent ce5e990 commit 7332066

File tree

1 file changed

+35
-34
lines changed

1 file changed

+35
-34
lines changed

public/data/html.json

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,46 @@
99
"code": [
1010
"<!DOCTYPE html>",
1111
"<html style=\"margin: 0\">",
12-
" <head></head>",
12+
" <head>",
13+
" <style type=\"text/css\">",
14+
" body {",
15+
" margin: 0;",
16+
" display: flex;",
17+
" flex-direction: column;",
18+
" min-height: 100svh; /* Smallest viewport height */",
19+
" min-height: 100vh; /* Standard viewport height */",
20+
" min-height: 100dvh; /* Dynamic viewport height */",
21+
" min-height: 100lvh; /* Largest viewport height */",
22+
" background-color: red;",
23+
" }",
24+
"",
25+
" .header {",
26+
" position: sticky;",
27+
" top: 0;",
28+
" left: 0;",
29+
" right: 0;",
30+
" background-color: blue;",
31+
" }",
32+
"",
33+
" .body {",
34+
" flex-grow: 1;",
35+
" background-color: whitesmoke;",
36+
" }",
37+
"",
38+
" .footer {",
39+
" position: sticky;",
40+
" bottom: 0;",
41+
" left: 0;",
42+
" right: 0;",
43+
" background-color: blue;",
44+
" }",
45+
" </style>",
46+
" <head>",
1347
" <body>",
1448
" <div class=\"header\">header</div>",
1549
" <div class=\"body\">body/content</div>",
1650
" <div class=\"footer\">footer</div>",
1751
" </body>",
18-
" <style type=\"text/css\">",
19-
" body {",
20-
" margin: 0;",
21-
" display: flex;",
22-
" flex-direction: column;",
23-
" min-height: 100svh; /* Smallest viewport height */",
24-
" min-height: 100vh; /* Standard viewport height */",
25-
" min-height: 100dvh; /* Dynamic viewport height */",
26-
" min-height: 100lvh; /* Largest viewport height */",
27-
" background-color: red;",
28-
" }",
29-
"",
30-
" .header {",
31-
" position: sticky;",
32-
" top: 0;",
33-
" left: 0;",
34-
" right: 0;",
35-
" background-color: blue;",
36-
" }",
37-
"",
38-
" .body {",
39-
" flex-grow: 1;",
40-
" background-color: whitesmoke;",
41-
" }",
42-
"",
43-
" .footer {",
44-
" position: sticky;",
45-
" bottom: 0;",
46-
" left: 0;",
47-
" right: 0;",
48-
" background-color: blue;",
49-
" }",
50-
" </style>",
5152
"</html>"
5253
],
5354
"tags": ["html", "css", "layout", "sticky", "flexbox", "viewport"],

0 commit comments

Comments
 (0)