@semanticus/semanticus-css 0.4.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/semanticus-semantics.css +1 -1
- package/dist/semanticus-utilities.css +2 -2
- package/dist/semanticus-variants.css +1 -1
- package/dist/semanticus.css +2 -2
- package/dist/semanticus.size.slim.css +1 -1
- package/package.json +5 -5
- package/src/index.css +4 -4
- package/src/semantics/_article.css +10 -4
- package/src/semantics/_aside.css +16 -0
- package/src/semantics/_body.css +5 -7
- package/src/semantics/_button.css +25 -1
- package/src/semantics/_details.css +7 -8
- package/src/semantics/_dialog.css +11 -17
- package/src/semantics/_footer.css +12 -0
- package/src/semantics/_header.css +12 -0
- package/src/semantics/_links.css +17 -0
- package/src/semantics/_main.css +8 -1
- package/src/semantics/_nav.css +55 -88
- package/src/semantics/_role-tooltip.css +1 -1
- package/src/semantics/_section.css +3 -0
- package/src/semantics/_typography.css +15 -6
- package/src/semantics/index.css +1 -1
- package/src/semantics/modules.css +3 -0
- package/src/sizes/slim.css +31 -2
- package/src/utilities/_variables.css +5 -0
- package/src/utilities/colors/_background-colors.css +39 -7
- package/src/utilities/colors/_text-colors.css +108 -18
- package/src/utilities/index.css +2 -2
- package/src/utilities/sizing/_height.css +4 -0
- package/src/utilities/sizing/_width.css +8 -0
- package/src/{_variables.css → variables/_all.css} +17 -145
- package/src/variables/_shared.css +121 -0
- package/src/variants/_card.css +4 -0
- package/src/variants/_contained.css +43 -0
- package/src/variants/_container.css +1 -1
- package/src/variants/_contrast.css +13 -16
- package/src/variants/_flow.css +15 -0
- package/src/variants/_ghost.css +36 -33
- package/src/variants/_panel.css +18 -0
- package/src/variants/_secondary.css +1 -4
- package/src/variants/_sidebar.css +11 -0
- package/src/variants/index.css +2 -2
- package/src/variants/modules.css +8 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
:root
|
|
1
|
+
:root{--transparent:transparent;--font-family-emoji:"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-sans-serif:system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, var(--font-family-emoji);--font-family-monospace:ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace, var(--font-family-emoji);--font-family:var(--font-family-sans-serif);--line-height:1.5;--font-weight:400;--font-size:100%;--text-underline-offset:.1rem;--border-radius:.25rem;--border-width:.0625rem;--outline-width:.125rem;--transition:.2s ease-in-out;--spacing:1rem;--responsive-multiplier:1;--typography-spacing-vertical:1rem;--block-spacing-vertical:var(--spacing);--block-spacing-horizontal:var(--spacing);--grid-column-gap:var(--spacing);--grid-row-gap:var(--spacing);--form-element-spacing-vertical:.75rem;--form-element-spacing-horizontal:1rem;--group-shadow:0 0 0 transparent;--group-shadow-focus-with-button:0 0 0 var(--outline-width) var(--color-primary-focus);--group-shadow-focus-with-input:0 0 0 .0625rem var(--form-border-color);--modal-overlay-backdrop-filter:blur(.375rem);--nav-link-spacing-vertical:.5rem;--nav-link-spacing-horizontal:.5rem;--nav-breadcrumb-divider:">";--icon-checkbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--icon-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");--icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--icon-date:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");--icon-time:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");--icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");--icon-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");--icon-loading:url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E");--sidebar-width:25%}@media (width>=576px){:root{--font-size:106.25%;--sidebar-width:max(25%, 150px);--responsive-multiplier:1.25}:host{--font-size:106.25%;--sidebar-width:max(25%, 150px);--responsive-multiplier:1.25}}@media (width>=768px){:root{--font-size:112.5%;--sidebar-width:max(22%, 180px);--responsive-multiplier:1.5}:host{--font-size:112.5%;--sidebar-width:max(22%, 180px);--responsive-multiplier:1.5}}@media (width>=1024px){:root{--font-size:118.75%;--sidebar-width:max(20%, 200px);--responsive-multiplier:1.75}:host{--font-size:118.75%;--sidebar-width:max(20%, 200px);--responsive-multiplier:1.75}}@media (width>=1280px){:root{--font-size:125%;--sidebar-width:max(18%, 220px);--responsive-multiplier:2}:host{--font-size:125%;--sidebar-width:max(18%, 220px);--responsive-multiplier:2}}@media (width>=1536px){:root{--font-size:131.25%;--sidebar-width:clamp(240px, 16%, 300px);--responsive-multiplier:2.25}:host{--font-size:131.25%;--sidebar-width:clamp(240px, 16%, 300px);--responsive-multiplier:2.25}}:root{--font-size:1rem;--spacing:.75rem;--block-spacing-vertical:1.2rem;--block-spacing-horizontal:1.2rem;--form-element-spacing-vertical:.5rem;--form-element-spacing-horizontal:.7rem}:host{--font-size:1rem;--spacing:.75rem;--block-spacing-vertical:1.2rem;--block-spacing-horizontal:1.2rem;--form-element-spacing-vertical:.5rem;--form-element-spacing-horizontal:.7rem}@media (width>=1280px){:root{--responsive-multiplier:1.85}:host{--responsive-multiplier:1.85}}@media (width>=1536px){:root{--responsive-multiplier:2}:host{--responsive-multiplier:2}}[role=search] button,[role=search] [role=button],[role=group] button,[role=group] [role=button]{--form-element-spacing-horizontal:1rem}[role=search] [type=submit]{--form-element-spacing-horizontal:1rem}[role=search] [type=button]{--form-element-spacing-horizontal:1rem}[role=group] [type=submit]{--form-element-spacing-horizontal:1rem}[role=group] [type=button]{--form-element-spacing-horizontal:1rem}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semanticus/semanticus-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "lightweight CSS framework that prioritizes semantic HTML and ARIA-focused accessibility, with a small set of atomic utilities",
|
|
5
5
|
"author": "Joao Goncalves",
|
|
6
6
|
"style": "./dist/semanticus.css",
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"release:update-cdn-urls": "node scripts/update-cdn-urls.js",
|
|
89
89
|
"build": "npm run build:css && npm run build:palettes && npm run build:sizes && npm run build:update-size-claims",
|
|
90
90
|
"build:css": "npm run build:full && npm run build:semantics && npm run build:variants && npm run build:utilities",
|
|
91
|
-
"build:full": "lightningcss --bundle --minify --browserslist src/index.css -o dist/semanticus.css",
|
|
92
|
-
"build:semantics": "lightningcss --bundle --minify --browserslist src/semantics/index.css -o dist/semanticus-semantics.css",
|
|
93
|
-
"build:variants": "lightningcss --bundle --minify --browserslist src/variants/index.css -o dist/semanticus-variants.css",
|
|
94
|
-
"build:utilities": "lightningcss --bundle --minify --browserslist src/utilities/index.css -o dist/semanticus-utilities.css",
|
|
91
|
+
"build:full": "lightningcss --bundle --minify --browserslist src/index.css -o dist/semanticus.css --custom-media",
|
|
92
|
+
"build:semantics": "lightningcss --bundle --minify --browserslist src/semantics/index.css -o dist/semanticus-semantics.css --custom-media",
|
|
93
|
+
"build:variants": "lightningcss --bundle --minify --browserslist src/variants/index.css -o dist/semanticus-variants.css --custom-media",
|
|
94
|
+
"build:utilities": "lightningcss --bundle --minify --browserslist src/utilities/index.css -o dist/semanticus-utilities.css --custom-media",
|
|
95
95
|
"build:palettes": "node scripts/build-palettes.js",
|
|
96
96
|
"build:sizes": "node scripts/build-sizes.js",
|
|
97
97
|
"build:update-size-claims": "node scripts/update-size-claims.js",
|
package/src/index.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* Global variables */
|
|
8
|
-
@import './
|
|
8
|
+
@import './variables/_all.css';
|
|
9
9
|
|
|
10
10
|
/* Normalize */
|
|
11
11
|
@import './_normalize.css';
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
/* Semantics */
|
|
14
14
|
@import './semantics/modules.css';
|
|
15
15
|
|
|
16
|
-
/* Variants */
|
|
17
|
-
@import './variants/modules.css';
|
|
18
|
-
|
|
19
16
|
/* Utilities */
|
|
20
17
|
@import './utilities/modules.css';
|
|
18
|
+
|
|
19
|
+
/* Variants */
|
|
20
|
+
@import './variants/modules.css';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Article
|
|
3
|
-
*
|
|
4
|
-
* and be independently distributed (blog post, widget, etc.)
|
|
5
|
-
* Styling is provided by the .card class
|
|
2
|
+
* Article fills up the available width, and stretches to fill the available height.
|
|
3
|
+
* Stacks its children vertically.
|
|
6
4
|
*/
|
|
5
|
+
article {
|
|
6
|
+
--block-spacing-vertical: calc(var(--spacing) * var(--responsive-multiplier));
|
|
7
|
+
--block-spacing-horizontal: calc(var(--spacing) * var(--responsive-multiplier));
|
|
8
|
+
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding-block: var(--block-spacing-vertical);
|
|
11
|
+
padding-inline: var(--block-spacing-horizontal);
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aside its width changes according to breakpoints (see src/variables/_shared.css),
|
|
3
|
+
* its height grows to fill the available space,
|
|
4
|
+
* and stacks its children in a column with space between them (like a <nav> would).
|
|
5
|
+
* In case of a single child, this child will fill the entire height.
|
|
6
|
+
*/
|
|
7
|
+
aside {
|
|
8
|
+
padding-inline: var(--block-spacing-horizontal);
|
|
9
|
+
width: var(--sidebar-width) !important;
|
|
10
|
+
|
|
11
|
+
:where(ol, ul, li) {
|
|
12
|
+
align-items: stretch !important;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/semantics/_body.css
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body fills up the available width, and has the same height as the viewport.
|
|
3
|
+
* Stacks its children vertically.
|
|
4
|
+
*/
|
|
1
5
|
body {
|
|
2
6
|
width: 100%;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
& > header,
|
|
6
|
-
& > main,
|
|
7
|
-
& > footer {
|
|
8
|
-
padding-block: var(--block-spacing-vertical);
|
|
9
|
-
}
|
|
7
|
+
min-height: 100svh;
|
|
10
8
|
}
|
|
@@ -87,13 +87,15 @@ button:focus, button:is([aria-current]:not([aria-current=false])):focus,
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
[type=reset]:is([aria-current]:not([aria-current=false]), :hover, :active, :focus),
|
|
90
|
-
[type=file]::file-selector-button:is(:hover, :active, :focus)
|
|
90
|
+
[type=file]::file-selector-button:is(:hover, :active, :focus),
|
|
91
|
+
[aria-label="Close"]:is(:hover, :active, :focus) {
|
|
91
92
|
--color-background: var(--color-secondary-hover-bg);
|
|
92
93
|
--border-color: var(--color-secondary-hover-border);
|
|
93
94
|
--color-text: var(--color-secondary-inverse);
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
[type=reset]:focus,
|
|
98
|
+
[aria-label="Close"]:focus,
|
|
97
99
|
[type=reset]:is([aria-current]:not([aria-current=false])):focus,
|
|
98
100
|
[type=file]::file-selector-button:focus {
|
|
99
101
|
--shadow-lg: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-width) var(--color-secondary-focus);
|
|
@@ -104,3 +106,25 @@ fieldset[disabled] :is(button, [type=submit], [type=button], [type=reset], [role
|
|
|
104
106
|
opacity: 0.5;
|
|
105
107
|
pointer-events: none;
|
|
106
108
|
}
|
|
109
|
+
|
|
110
|
+
aside {
|
|
111
|
+
nav {
|
|
112
|
+
:where(button, [role=button], [type=button], input:not([type=checkbox], [type=radio], [type=range], [type=file]), select) {
|
|
113
|
+
display: block !important;
|
|
114
|
+
width: 100%;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
nav {
|
|
120
|
+
:where(button, [role=button], [type=button], input:not([type=checkbox], [type=radio], [type=range], [type=file]), select) {
|
|
121
|
+
--form-element-spacing-vertical: calc(var(--nav-link-spacing-vertical) - var(--border-width) * 2);
|
|
122
|
+
--form-element-spacing-horizontal: var(--nav-link-spacing-horizontal);
|
|
123
|
+
|
|
124
|
+
height: auto;
|
|
125
|
+
margin-right: inherit;
|
|
126
|
+
margin-bottom: 0;
|
|
127
|
+
margin-left: inherit;
|
|
128
|
+
padding: var(--form-element-spacing-vertical) var(--form-element-spacing-horizontal);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -164,7 +164,7 @@ details:has(> summary[aria-haspopup="menu"]) {
|
|
|
164
164
|
|
|
165
165
|
& > :where(summary + ul[role="menu"]) {
|
|
166
166
|
display: flex;
|
|
167
|
-
z-index:
|
|
167
|
+
z-index: var(--max-z-index);
|
|
168
168
|
position: absolute;
|
|
169
169
|
left: 0;
|
|
170
170
|
flex-direction: column;
|
|
@@ -253,10 +253,13 @@ details:has(> summary[aria-haspopup="menu"]) {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
label > details:has(> summary[aria-haspopup="menu"]) {
|
|
257
|
+
margin-top: calc(var(--spacing) * 0.25);
|
|
258
|
+
}
|
|
259
|
+
|
|
256
260
|
nav details:has(> summary[aria-haspopup="menu"]) {
|
|
257
261
|
margin-bottom: 0;
|
|
258
262
|
display: inline;
|
|
259
|
-
margin: calc(var(--nav-element-spacing-vertical) * -1) 0;
|
|
260
263
|
|
|
261
264
|
& > summary::after {
|
|
262
265
|
transform: rotate(0deg) translateX(0rem);
|
|
@@ -265,7 +268,7 @@ nav details:has(> summary[aria-haspopup="menu"]) {
|
|
|
265
268
|
& > :where(summary:not([role])) {
|
|
266
269
|
display: flex;
|
|
267
270
|
align-items: center;
|
|
268
|
-
height:
|
|
271
|
+
height: auto;
|
|
269
272
|
padding: calc(var(--nav-link-spacing-vertical) - var(--border-width) * 2) var(--nav-link-spacing-horizontal);
|
|
270
273
|
}
|
|
271
274
|
|
|
@@ -282,11 +285,7 @@ nav details:has(> summary[aria-haspopup="menu"]) {
|
|
|
282
285
|
display: flex;
|
|
283
286
|
align-items: center;
|
|
284
287
|
width: auto;
|
|
285
|
-
height:
|
|
288
|
+
height: auto;
|
|
286
289
|
padding: calc(var(--nav-link-spacing-vertical) - var(--border-width) * 2) var(--nav-link-spacing-horizontal);
|
|
287
290
|
}
|
|
288
291
|
}
|
|
289
|
-
|
|
290
|
-
label > details:has(> summary[aria-haspopup="menu"]) {
|
|
291
|
-
margin-top: calc(var(--spacing) * 0.25);
|
|
292
|
-
}
|
|
@@ -41,6 +41,7 @@ dialog {
|
|
|
41
41
|
/* Modal content box - styled like a card */
|
|
42
42
|
/* Works with: <dialog><article>...</article></dialog> */
|
|
43
43
|
& > article {
|
|
44
|
+
position: relative;
|
|
44
45
|
width: 100%;
|
|
45
46
|
max-height: calc(100vh - var(--spacing) * 2);
|
|
46
47
|
margin: var(--spacing);
|
|
@@ -60,6 +61,7 @@ dialog {
|
|
|
60
61
|
|
|
61
62
|
/* Header styling */
|
|
62
63
|
& > header {
|
|
64
|
+
width: calc(100% + var(--block-spacing-horizontal) * 2);
|
|
63
65
|
margin: calc(var(--block-spacing-vertical) * -1) calc(var(--block-spacing-horizontal) * -1) var(--block-spacing-vertical);
|
|
64
66
|
padding: calc(var(--block-spacing-vertical) * 0.66) var(--block-spacing-horizontal);
|
|
65
67
|
background-color: var(--card-section-bg);
|
|
@@ -74,6 +76,7 @@ dialog {
|
|
|
74
76
|
|
|
75
77
|
/* Footer styling */
|
|
76
78
|
& > footer {
|
|
79
|
+
width: calc(100% + var(--block-spacing-horizontal) * 2);
|
|
77
80
|
margin: var(--block-spacing-vertical) calc(var(--block-spacing-horizontal) * -1) calc(var(--block-spacing-vertical) * -1);
|
|
78
81
|
padding: calc(var(--block-spacing-vertical) * 0.66) var(--block-spacing-horizontal);
|
|
79
82
|
background-color: var(--card-section-bg);
|
|
@@ -91,22 +94,16 @@ dialog {
|
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
/* Close button
|
|
95
|
-
&
|
|
97
|
+
/* Close button styling */
|
|
98
|
+
& :is(a, button)[rel=prev]:not([role=button]) {
|
|
96
99
|
margin: 0;
|
|
97
|
-
margin-left: var(--spacing);
|
|
98
100
|
padding: 0;
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* Close button styling */
|
|
103
|
-
& :is(a, button)[rel=prev] {
|
|
101
|
+
position: absolute;
|
|
104
102
|
display: block;
|
|
105
103
|
width: 1rem;
|
|
106
104
|
height: 1rem;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
margin-left: auto;
|
|
105
|
+
top: calc(var(--block-spacing-vertical) * .66);
|
|
106
|
+
right: var(--block-spacing-horizontal);
|
|
110
107
|
border: none;
|
|
111
108
|
border-radius: 0;
|
|
112
109
|
background-image: var(--icon-close);
|
|
@@ -117,13 +114,10 @@ dialog {
|
|
|
117
114
|
box-shadow: none;
|
|
118
115
|
opacity: 0.5;
|
|
119
116
|
transition: opacity var(--transition);
|
|
120
|
-
}
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
box-shadow: none;
|
|
126
|
-
opacity: 1;
|
|
118
|
+
&:hover {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
127
121
|
}
|
|
128
122
|
}
|
|
129
123
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Footer
|
|
3
|
+
*/
|
|
4
|
+
footer {
|
|
5
|
+
--typography-spacing-vertical: 0;
|
|
6
|
+
--typography-headings-top: 0;
|
|
7
|
+
--block-spacing-vertical: calc(var(--spacing) * var(--responsive-multiplier));
|
|
8
|
+
--block-spacing-horizontal: calc(var(--spacing) * var(--responsive-multiplier));
|
|
9
|
+
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding-block: var(--block-spacing-vertical);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header
|
|
3
|
+
*/
|
|
4
|
+
header {
|
|
5
|
+
--typography-spacing-vertical: 0;
|
|
6
|
+
--typography-headings-top: 0;
|
|
7
|
+
--block-spacing-vertical: calc(var(--spacing) * var(--responsive-multiplier));
|
|
8
|
+
--block-spacing-horizontal: calc(var(--spacing) * var(--responsive-multiplier));
|
|
9
|
+
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding-block: var(--block-spacing-vertical);
|
|
12
|
+
}
|
package/src/semantics/_links.css
CHANGED
|
@@ -31,3 +31,20 @@
|
|
|
31
31
|
a[role=button] {
|
|
32
32
|
display: inline-block;
|
|
33
33
|
}
|
|
34
|
+
|
|
35
|
+
aside {
|
|
36
|
+
nav {
|
|
37
|
+
a:not([role=button]), [role=link] {
|
|
38
|
+
display: block !important;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
nav {
|
|
45
|
+
a:not([role=button]), [role=link] {
|
|
46
|
+
&:not(:hover) {
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
package/src/semantics/_main.css
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main fills up the available width, and has a height defined by its content.
|
|
3
|
+
* Stacks its children vertically.
|
|
4
|
+
*/
|
|
1
5
|
main {
|
|
2
|
-
|
|
6
|
+
--block-spacing-vertical: calc(var(--spacing) * var(--responsive-multiplier));
|
|
7
|
+
--block-spacing-horizontal: calc(var(--spacing) * var(--responsive-multiplier));
|
|
8
|
+
|
|
9
|
+
width: 100%;
|
|
3
10
|
}
|
package/src/semantics/_nav.css
CHANGED
|
@@ -1,116 +1,83 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
1
|
/**
|
|
3
2
|
* Nav
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
nav {
|
|
5
|
+
--typography-spacing-vertical: 0;
|
|
6
|
+
--typography-headings-top: 0;
|
|
9
7
|
|
|
10
|
-
:where(nav, nav ul) {
|
|
11
8
|
display: flex;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
:where(nav) {
|
|
9
|
+
gap: var(--spacing);
|
|
10
|
+
align-items: center;
|
|
15
11
|
justify-content: space-between;
|
|
16
12
|
overflow: visible;
|
|
17
|
-
}
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
padding: 0;
|
|
23
|
-
list-style: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:where(nav ol:first-of-type, nav ul:first-of-type) {
|
|
27
|
-
margin-left: calc(var(--nav-element-spacing-horizontal) * -1);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:where(nav ol:last-of-type, nav ul:last-of-type) {
|
|
31
|
-
margin-right: calc(var(--nav-element-spacing-horizontal) * -1);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:where(nav li) {
|
|
35
|
-
display: inline-block;
|
|
36
|
-
margin: 0;
|
|
37
|
-
padding: var(--nav-element-spacing-vertical) var(--nav-element-spacing-horizontal);
|
|
38
|
-
}
|
|
14
|
+
& > * {
|
|
15
|
+
margin: 0 !important;
|
|
16
|
+
}
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
&[aria-label=breadcrumb] {
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: start;
|
|
21
|
+
|
|
22
|
+
& ul li {
|
|
23
|
+
&:not(:first-child) {
|
|
24
|
+
margin-inline-start: calc(var(--nav-link-spacing-horizontal) * 2);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:not(:last-child)::after {
|
|
28
|
+
display: inline-block;
|
|
29
|
+
position: absolute;
|
|
30
|
+
width: calc(var(--nav-link-spacing-horizontal) * 4);
|
|
31
|
+
content: var(--nav-breadcrumb-divider);
|
|
32
|
+
color: var(--color-text-muted);
|
|
33
|
+
text-align: center;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
& :where(a[aria-current]:not([aria-current=false]), [role=link][aria-current]:not([aria-current=false])) {
|
|
40
|
+
background-color: transparent;
|
|
41
|
+
color: inherit;
|
|
48
42
|
text-decoration: none;
|
|
43
|
+
pointer-events: none;
|
|
49
44
|
}
|
|
50
45
|
}
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
47
|
+
ul, ol {
|
|
48
|
+
align-items: center;
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: var(--spacing);
|
|
51
|
+
list-style: none;
|
|
52
|
+
margin-bottom: 0 !important;
|
|
53
|
+
padding: 0;
|
|
60
54
|
|
|
61
|
-
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: start;
|
|
64
|
-
|
|
65
|
-
& ul li {
|
|
66
|
-
&:not(:first-child) {
|
|
67
|
-
margin-inline-start: var(--nav-link-spacing-horizontal);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
& :where(a, [role=link]) {
|
|
71
|
-
margin: calc(var(--nav-link-spacing-vertical) * -1) 0;
|
|
72
|
-
margin-inline-start: calc(var(--nav-link-spacing-horizontal) * -1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&:not(:last-child)::after {
|
|
55
|
+
li {
|
|
76
56
|
display: inline-block;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
text-align: center;
|
|
83
|
-
text-decoration: none;
|
|
84
|
-
white-space: nowrap;
|
|
57
|
+
|
|
58
|
+
&::before {
|
|
59
|
+
float: left;
|
|
60
|
+
content: "";
|
|
61
|
+
}
|
|
85
62
|
}
|
|
86
63
|
}
|
|
87
64
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
color: inherit;
|
|
91
|
-
text-decoration: none;
|
|
92
|
-
pointer-events: none;
|
|
65
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
66
|
+
margin-top: 0 !important;
|
|
93
67
|
}
|
|
94
68
|
}
|
|
95
69
|
|
|
96
|
-
:where(
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
:where(aside li) {
|
|
101
|
-
padding: calc(var(--nav-element-spacing-vertical) * 0.5) var(--nav-element-spacing-horizontal);
|
|
70
|
+
[dir=rtl] :where(nav[aria-label=breadcrumb]) ul li:not(:last-child)::after {
|
|
71
|
+
content: "\\";
|
|
102
72
|
}
|
|
103
73
|
|
|
104
|
-
aside
|
|
105
|
-
|
|
106
|
-
|
|
74
|
+
aside {
|
|
75
|
+
> nav {
|
|
76
|
+
flex-grow: 1;
|
|
107
77
|
}
|
|
108
78
|
|
|
109
|
-
|
|
110
|
-
|
|
79
|
+
nav {
|
|
80
|
+
align-items: stretch !important;
|
|
81
|
+
flex-direction: column;
|
|
111
82
|
}
|
|
112
83
|
}
|
|
113
|
-
|
|
114
|
-
[dir=rtl] :where(nav[aria-label=breadcrumb]) ul li:not(:last-child)::after {
|
|
115
|
-
content: "\\";
|
|
116
|
-
}
|
|
@@ -52,12 +52,21 @@ h6 {
|
|
|
52
52
|
font-family: var(--font-family);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
/* Headings - progressive lightness using color-mix */
|
|
56
|
+
h1 { --color-text: var(--color-heading-base); }
|
|
57
|
+
h2 { --color-text: color-mix(in srgb, var(--color-heading-base), white 12%); }
|
|
58
|
+
h3 { --color-text: color-mix(in srgb, var(--color-heading-base), white 22%); }
|
|
59
|
+
h4 { --color-text: color-mix(in srgb, var(--color-heading-base), white 32%); }
|
|
60
|
+
h5 { --color-text: color-mix(in srgb, var(--color-heading-base), white 45%); }
|
|
61
|
+
h6 { --color-text: color-mix(in srgb, var(--color-heading-base), white 55%); }
|
|
62
|
+
|
|
63
|
+
/* Dark mode headings - base is lightest, mix in black for lower levels */
|
|
64
|
+
[data-theme="dark"] h1 { --color-text: var(--color-heading-base); }
|
|
65
|
+
[data-theme="dark"] h2 { --color-text: color-mix(in srgb, var(--color-heading-base), black 8%); }
|
|
66
|
+
[data-theme="dark"] h3 { --color-text: color-mix(in srgb, var(--color-heading-base), black 18%); }
|
|
67
|
+
[data-theme="dark"] h4 { --color-text: color-mix(in srgb, var(--color-heading-base), black 28%); }
|
|
68
|
+
[data-theme="dark"] h5 { --color-text: color-mix(in srgb, var(--color-heading-base), black 38%); }
|
|
69
|
+
[data-theme="dark"] h6 { --color-text: color-mix(in srgb, var(--color-heading-base), black 48%); }
|
|
61
70
|
|
|
62
71
|
:where(article, address, blockquote, dl, figure, form, ol, p, pre, table, ul, hr) ~ :is(h1, h2, h3, h4, h5, h6) {
|
|
63
72
|
margin-top: var(--typography-spacing-top);
|
package/src/semantics/index.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
@import "./_aria-busy.css";
|
|
8
8
|
@import "./_article.css";
|
|
9
|
+
@import "./_aside.css";
|
|
9
10
|
@import "./_body.css";
|
|
10
11
|
@import "./_button.css";
|
|
11
12
|
@import "./_code.css";
|
|
@@ -14,6 +15,8 @@
|
|
|
14
15
|
@import "./_document.css";
|
|
15
16
|
@import "./_embedded.css";
|
|
16
17
|
@import "./_figure.css";
|
|
18
|
+
@import "./_footer.css";
|
|
19
|
+
@import "./_header.css";
|
|
17
20
|
@import "./_hidden.css";
|
|
18
21
|
@import "./_hr.css";
|
|
19
22
|
@import "./_input.css";
|
package/src/sizes/slim.css
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Semanticus CSS Size: Slim
|
|
3
3
|
*/
|
|
4
|
+
|
|
5
|
+
/* Shared variables */
|
|
6
|
+
@import '../variables/_shared.css';
|
|
7
|
+
|
|
4
8
|
:root,
|
|
5
9
|
:host {
|
|
6
10
|
--font-size: 1rem;
|
|
7
11
|
--spacing: 0.75rem;
|
|
8
12
|
--block-spacing-vertical: 1.2rem;
|
|
9
13
|
--block-spacing-horizontal: 1.2rem;
|
|
10
|
-
--form-element-spacing-vertical: 0.
|
|
11
|
-
--form-element-spacing-horizontal: 0.
|
|
14
|
+
--form-element-spacing-vertical: 0.5rem;
|
|
15
|
+
--form-element-spacing-horizontal: 0.7rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (--breakpoint-xl) {
|
|
19
|
+
:root,
|
|
20
|
+
:host {
|
|
21
|
+
--responsive-multiplier: 1.85;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (--breakpoint-xxl) {
|
|
26
|
+
:root,
|
|
27
|
+
:host {
|
|
28
|
+
--responsive-multiplier: 2;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[role="search"] button,
|
|
33
|
+
[role="search"] [type="submit"],
|
|
34
|
+
[role="search"] [type="button"],
|
|
35
|
+
[role="search"] [role="button"],
|
|
36
|
+
[role="group"] button,
|
|
37
|
+
[role="group"] [type="submit"],
|
|
38
|
+
[role="group"] [type="button"],
|
|
39
|
+
[role="group"] [role="button"] {
|
|
40
|
+
--form-element-spacing-horizontal: 1rem;
|
|
12
41
|
}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/* Shared variables */
|
|
8
|
+
@import '../variables/_shared.css';
|
|
9
|
+
|
|
7
10
|
/* ==========================================================================
|
|
8
11
|
Theme-independent variables
|
|
9
12
|
========================================================================== */
|
|
@@ -62,6 +65,8 @@
|
|
|
62
65
|
--color-info-inverse: #fff;
|
|
63
66
|
--color-warning-inverse: #000;
|
|
64
67
|
--color-danger-inverse: #fff;
|
|
68
|
+
|
|
69
|
+
--max-z-index: 1050;
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
/* ==========================================================================
|