Skip to content

Commit 511bd11

Browse files
committed
MF: Use css for data-mf instead of js
1 parent d406661 commit 511bd11

File tree

13 files changed

+17117
-72
lines changed

13 files changed

+17117
-72
lines changed

assets/css/docs-nginx-com/style.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
/*copy from nginx-theme.css */
22

3+
[data-mf="false"] {
4+
display: block !important;
5+
}
6+
7+
[data-mf="true"] {
8+
display: none !important;
9+
}
10+
311
big,
412
html,
513
small {
@@ -2248,4 +2256,3 @@ text-decoration: none;
22482256
}
22492257

22502258
/*======END GDPR2==================*/
2251-

assets/css/v2/global/fonts.css

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* Regular */
2+
@font-face {
3+
font-family: "JetBrainsMono";
4+
font-style: normal;
5+
font-weight: 400; /* regular weight */
6+
src: url("../css/fonts/jetbrainsmono/JetBrainsMono-Light.woff2")
7+
format("woff2");
8+
font-display: swap;
9+
}
10+
11+
/* Italic */
12+
@font-face {
13+
font-family: "JetBrainsMono";
14+
font-style: italic;
15+
font-weight: 400;
16+
src: url("../css/fonts/jetbrainsmono/JetBrainsMono-Italic.woff2")
17+
format("woff2");
18+
font-display: swap;
19+
}
20+
21+
/* Bold */
22+
@font-face {
23+
font-family: "JetBrainsMono";
24+
font-style: normal;
25+
font-weight: 700;
26+
src: url("../css/fonts/jetbrainsmono/JetBrainsMono-SemiBold.woff2")
27+
format("woff2");
28+
font-display: swap;
29+
}
30+
31+
/* Bold Italic */
32+
@font-face {
33+
font-family: "JetBrainsMono";
34+
font-style: italic;
35+
font-weight: 700;
36+
src: url("../css/fonts/jetbrainsmono/JetBrainsMono-BoldItalic.woff2")
37+
format("woff2");
38+
font-display: swap;
39+
}

assets/css/v2/global/global-styles.css

Whitespace-only changes.

assets/css/v2/global/reset.css

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/* MARK: Reset
2+
*/
3+
html,
4+
body,
5+
p,
6+
ol,
7+
ul,
8+
li,
9+
dl,
10+
dt,
11+
dd,
12+
blockquote,
13+
figure,
14+
fieldset,
15+
legend,
16+
textarea,
17+
pre,
18+
iframe,
19+
hr,
20+
h1,
21+
h2,
22+
h3,
23+
h4,
24+
h5,
25+
h6 {
26+
margin: 0;
27+
padding: 0;
28+
}
29+
30+
@supports (font-variation-settings: normal) {
31+
:root {
32+
font-family: InterVariable, sans-serif;
33+
}
34+
35+
h1,
36+
h2,
37+
h3,
38+
h4,
39+
h5,
40+
h6,
41+
.breadcrumb {
42+
font-variation-settings: "wght" 500;
43+
}
44+
}
45+
46+
h1,
47+
h2,
48+
h3,
49+
h4,
50+
h5,
51+
h6,
52+
.breadcrumb {
53+
font-weight: 500;
54+
}
55+
56+
html {
57+
scroll-behavior: smooth;
58+
}
59+
60+
h1,
61+
h2,
62+
h3,
63+
h4,
64+
h5,
65+
h6 {
66+
scroll-margin-top: 1.5rem;
67+
}
68+
69+
/* MARK: Header
70+
*/
71+
p {
72+
font-weight: 350;
73+
}
74+
75+
ul,
76+
ol {
77+
padding: 0;
78+
margin: 0.5rem 0 0.5rem 1rem;
79+
}
80+
81+
ul li,
82+
ol li {
83+
margin: 0.5rem 0 0.5rem 0;
84+
}
85+
86+
ul ul,
87+
ul ol,
88+
ol ul,
89+
ol ol {
90+
padding: 0 0 0 1rem;
91+
}
92+
93+
ul li:last-child,
94+
ol li:last-child {
95+
margin-bottom: 0;
96+
}

assets/css/v2/global/variables.css

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
:root {
2+
/* webfonts */
3+
font-family: "Inter var", system-ui, -apple-system, BlinkMacSystemFont,
4+
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
5+
sans-serif;
6+
font-feature-settings: "liga" on, "calt" on;
7+
8+
/* fallback to slightly thinner font on browsers without variable 'wght' support */
9+
font-weight: 350;
10+
11+
/* base rem = 16px by default, left as percentage for screen readers */
12+
font-size: 100%;
13+
14+
/* MARK: Colors
15+
*/
16+
--color-brand: 56.6% 0.194 147.7;
17+
--color-brand-300: 0.84 0.0699 157.51;
18+
--color-brand-200: 0.91 0.0406 157.72;
19+
--color-brand-100: 0.98 0.0107 158.85;
20+
--color-background: 1 0 0;
21+
--color-foreground: 0 0 0;
22+
--color-shadow: 0.86 0 0;
23+
--color-inline_codeblock-border: 0.85 0 0;
24+
--color-inline_codeblock-background: 0.98 0 0;
25+
--color-codeblock-border: 0.63 0 0;
26+
--color-codeblock-shadow: 0.92 0 0;
27+
--color-codeblock-background: 1 0 0;
28+
--color-codeblock-highlight: 0.99 0.0479 105.97;
29+
--color-footer: 0.23 0 0;
30+
--color-footer-text: 0.91 0 0;
31+
--color-product-title: 0.64 0 0;
32+
--color-tabs-inactive-border: 0 0 0 / 20%;
33+
--color-callout-warning: 0.65 0.188 24;
34+
--color-callout-warning-shadow: 0.65 0.188 24 / 20%;
35+
--color-callout-caution: 0.8 0.1613 71.21;
36+
--color-callout-caution-shadow: 0.8 0.1613 71.21 / 20%;
37+
--color-callout-important: 0.36 0 0;
38+
--color-callout-important-shadow: 0.23 0 0 / 7.06%;
39+
--color-divider: 0.85 0 0;
40+
41+
/* MARK: Grids
42+
*/
43+
--grid-sidebar: 24rem;
44+
--grid-sidebar-gutter: 3rem;
45+
--grid-content: minmax(34rem, 50rem);
46+
--grid-content-mobile: minmax(20rem, 50rem);
47+
--grid-side-callout: minmax(18rem, 26rem);
48+
--grid-column-gutter: 3.5rem;
49+
50+
--code-copy-icon-height: 1rem;
51+
--code-copy-icon-width: 1rem;
52+
--breadcrumb-max-height: 54px;
53+
--sidebar-margin: 1.5rem;
54+
--sidebar-line-box-side-length: 8px;
55+
--sidebar-line-box-top: 6px;
56+
--sidebar-line-box-left: 12px;
57+
--sidebar-width: 22rem;
58+
--sidebar-line-width: 11.5px;
59+
--sidebar-mobile-top-displacement: 5rem;
60+
--side-gutter-width: 20rem;
61+
--table-top-bottom-spacing: 1rem;
62+
--table-row-space-between: 1.5rem;
63+
--table-min-column-spacing-narrow: 1.5rem;
64+
--table-min-column-spacing-wide: 0.75rem;
65+
--table-header-bottom-spacing: 1rem;
66+
--table-line-height: 1px;
67+
--codeblock-comment-diff: 2rem;
68+
--codeblock-comment-space-between: 10px;
69+
--codeblock-horizontal-line-length: 2rem;
70+
--codeblock-horizontal-line-overflow: 0.25rem;
71+
--codeblock-border-thickness: 1px;
72+
--codeblock-code-section-padding-left: 1rem;
73+
--codeblock-line-box-side-length: 4px;
74+
--overflow-gutter-extension: 1rem;
75+
76+
--flow-gap: 1rem;
77+
}

assets/css/v2/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[data-mf="true"] {
2+
display: block !important;
3+
}
4+
5+
[data-mf="false"] {
6+
display: none !important;
7+
}
8+
19
/* Regular */
210
@font-face {
311
font-family: "JetBrainsMono";

0 commit comments

Comments
 (0)