@splendidlabz/styles 2.3.2 → 3.0.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/dist/no-tw/layouts.css +1278 -0
- package/dist/no-tw/styles.css +2018 -0
- package/dist/styles.css +1254 -1442
- package/package.json +23 -9
- package/src/addons/index.css +1 -0
- package/src/addons/scrollbars.css +60 -0
- package/src/{UI/_Accordion.scss → components/accordion.css} +8 -10
- package/src/components/drawer.css +20 -0
- package/src/components/index.css +2 -0
- package/src/effects/elevation.css +290 -0
- package/src/effects/frosted-glass.css +42 -0
- package/src/effects/gradients.css +107 -0
- package/src/effects/highlight.css +13 -0
- package/src/effects/index.css +6 -0
- package/src/effects/inner-border.css +18 -0
- package/src/effects/shadows.css +49 -0
- package/src/effects/text-outline.css +27 -0
- package/src/form/index.css +2 -0
- package/src/form/text-field.css +72 -0
- package/src/form/textarea.css +37 -0
- package/src/{Base/_Accessibility.scss → generic/accessibility.css} +21 -20
- package/src/generic/anchors-and-buttons.css +55 -0
- package/src/generic/form.css +62 -0
- package/src/generic/index.css +4 -0
- package/src/generic/typography.css +48 -0
- package/src/layouts/index.css +6 -0
- package/src/layouts/macro/flex-grid.css +33 -0
- package/src/layouts/macro/grid.css +127 -0
- package/src/layouts/macro/index.css +5 -0
- package/src/layouts/macro/masonry.css +23 -0
- package/src/layouts/macro/subgrid.css +33 -0
- package/src/layouts/macro/wrap.css +6 -0
- package/src/layouts/micro/breakout.css +38 -0
- package/src/layouts/micro/divider.css +102 -0
- package/src/layouts/micro/index.css +6 -0
- package/src/layouts/micro/micro.css +54 -0
- package/src/layouts/micro/scrollable.css +70 -0
- package/src/layouts/micro/stack.css +29 -0
- package/src/layouts/micro/stacking-context.css +3 -0
- package/src/layouts/position/edge.css +429 -0
- package/src/layouts/position/fixed.css +102 -0
- package/src/layouts/position/index.css +5 -0
- package/src/layouts/position/nudge.css +74 -0
- package/src/layouts/position/pos.css +337 -0
- package/src/layouts/position/sticky.css +11 -0
- package/src/layouts/shell/index.css +2 -0
- package/src/layouts/shell/shell-grid.css +34 -0
- package/src/layouts/shell/shell-simple.css +15 -0
- package/src/primitives/backdrop.css +8 -0
- package/src/{utils/_mixins.scss → primitives/break-word.css} +4 -2
- package/src/primitives/card.css +51 -0
- package/src/primitives/focus-within.css +12 -0
- package/src/primitives/hero-heading.css +44 -0
- package/src/primitives/indent-list.css +77 -0
- package/src/primitives/index.css +11 -0
- package/src/{Components/_Prose.scss → primitives/prose.css} +11 -29
- package/src/primitives/shapes.css +16 -0
- package/src/primitives/simple-svg.css +7 -0
- package/src/primitives/table.css +197 -0
- package/src/primitives/text.css +4 -0
- package/src/primitives/writing-mode.css +51 -0
- package/src/reset.css +114 -0
- package/src/scripts/Masonry.js +8 -0
- package/src/scripts/Scrollable.js +14 -0
- package/src/scripts/Sticky.js +34 -0
- package/src/scripts/all.js +7 -0
- package/src/scripts/index.js +4 -0
- package/src/styles.css +14 -0
- package/src/tools/border.css +9 -0
- package/src/tools/index.css +5 -0
- package/src/tools/object.css +5 -0
- package/src/tools/outlines.css +27 -0
- package/src/tools/pigment.css +205 -0
- package/src/tools/transitions.css +14 -0
- package/src/type/font-position.css +18 -0
- package/src/type/index.css +1 -0
- package/src/variables/breakpoints.css +103 -0
- package/src/variables/font.css +88 -0
- package/src/variables/index.css +4 -0
- package/src/variables/radius.css +54 -0
- package/src/variables/variables.css +34 -0
- package/dist/UI/Codepen.css +0 -13
- package/dist/UI/Codepen.css.map +0 -1
- package/dist/UI/Tweet.css +0 -7
- package/dist/UI/Tweet.css.map +0 -1
- package/dist/UI/Youtube.css +0 -13
- package/dist/UI/Youtube.css.map +0 -1
- package/dist/styles.css.map +0 -1
- package/src/Base/_Base.scss +0 -57
- package/src/Base/_Focus.scss +0 -38
- package/src/Base/_Transition.scss +0 -8
- package/src/Base/_index.scss +0 -4
- package/src/Components/_Box.scss +0 -9
- package/src/Components/_BrowserFrame.scss +0 -89
- package/src/Components/_Figure.scss +0 -5
- package/src/Components/_List.scss +0 -19
- package/src/Components/_Scrollbars.scss +0 -40
- package/src/Components/_SimpleSVG.scss +0 -9
- package/src/Components/_index.scss +0 -12
- package/src/Effects/_Backdrop.scss +0 -4
- package/src/Effects/_Elevation.scss +0 -92
- package/src/Effects/_Glow.scss +0 -51
- package/src/Effects/_Gradients.scss +0 -88
- package/src/Effects/_Shadows.scss +0 -51
- package/src/Effects/_SpecialShadows.scss +0 -45
- package/src/Effects/_Text-Outline.scss +0 -25
- package/src/Effects/_index.scss +0 -12
- package/src/Experimental/_SimplePricingPlan.scss +0 -141
- package/src/Forms/_Button.scss +0 -106
- package/src/Forms/_Combobox.scss +0 -49
- package/src/Forms/_FormBase.scss +0 -43
- package/src/Forms/_FormControls.scss +0 -95
- package/src/Forms/_Range.scss +0 -101
- package/src/Forms/_Select.scss +0 -114
- package/src/Forms/_Switch.scss +0 -66
- package/src/Forms/_TextField.scss +0 -116
- package/src/Forms/_Textarea.scss +0 -41
- package/src/Forms/_index.scss +0 -10
- package/src/Typography/_WritingMode.scss +0 -33
- package/src/Typography/_index.scss +0 -1
- package/src/UI/Codepen.scss +0 -11
- package/src/UI/Tweet.scss +0 -5
- package/src/UI/Youtube.scss +0 -13
- package/src/UI/_Breadcrumbs.scss +0 -24
- package/src/UI/_CQChecker.scss +0 -16
- package/src/UI/_Callout.scss +0 -31
- package/src/UI/_Drawer.scss +0 -28
- package/src/UI/_Dropdown.scss +0 -14
- package/src/UI/_FancyList.scss +0 -30
- package/src/UI/_PerspectiveHover.scss +0 -9
- package/src/UI/_Popover.scss +0 -25
- package/src/UI/_Resizer.scss +0 -43
- package/src/UI/_Spotlight.scss +0 -42
- package/src/UI/_Status.scss +0 -33
- package/src/UI/_Tabs.scss +0 -112
- package/src/UI/_Textwall.scss +0 -22
- package/src/UI/_index.scss +0 -17
- package/src/Utilities/_Shapes.scss +0 -20
- package/src/Utilities/_index.scss +0 -1
- package/src/Variables/_Globals.scss +0 -33
- package/src/Variables/_index.scss +0 -1
- package/src/_Animations.scss +0 -18
- package/src/_Fill.scss +0 -314
- package/src/styles.scss +0 -12
- package/src/utils/_index.scss +0 -3
- package/src/utils/functions/_fns.scss +0 -77
- package/src/utils/functions/_fonts.scss +0 -114
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*********************
|
|
2
|
+
* Shadow Variables *
|
|
3
|
+
* --shadow-x: 0;
|
|
4
|
+
* --shadow-y: 0;
|
|
5
|
+
* --shadow-blur: 0;
|
|
6
|
+
* --shadow-spread: 0;
|
|
7
|
+
* --shadow-color: transparent;
|
|
8
|
+
* --text-shadow-x: 0;
|
|
9
|
+
* --text-shadow-y: 0;
|
|
10
|
+
* --text-shadow-blur: 0;
|
|
11
|
+
* --text-shadow-color: transparent;
|
|
12
|
+
* --drop-shadow-x: 0;
|
|
13
|
+
* --drop-shadow-y: 0;
|
|
14
|
+
* --drop-shadow-blur: 0;
|
|
15
|
+
* --drop-shadow-color: transparent;
|
|
16
|
+
*********************/
|
|
17
|
+
|
|
18
|
+
@utility shadow {
|
|
19
|
+
& {
|
|
20
|
+
--shadow-string: var(--shadow-x, 0) var(--shadow-y, 0) var(--shadow-blur, 0)
|
|
21
|
+
var(--shadow-spread, 0) var(--shadow-color, var(--tw-shadow-color));
|
|
22
|
+
box-shadow: var(--shadow, var(--shadow-string));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@utility text-shadow {
|
|
27
|
+
& {
|
|
28
|
+
--text-shadow-string: var(--text-shadow-x, 0) var(--text-shadow-y, 0)
|
|
29
|
+
var(--text-shadow-blur, 0) var(--text-shadow-color);
|
|
30
|
+
text-shadow: var(--text-shadow, var(--text-shadow-string));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@utility drop-shadow {
|
|
35
|
+
& {
|
|
36
|
+
--drop-shadow-string: var(--drop-shadow-x, 0) var(--drop-shadow-y, 0)
|
|
37
|
+
var(--drop-shadow-blur, 0) var(--drop-shadow-color);
|
|
38
|
+
filter: drop-shadow(var(--drop-shadow, var(--drop-shadow-string)));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Will this work? */
|
|
43
|
+
/*********************
|
|
44
|
+
* Shadow Utilities *
|
|
45
|
+
* Haven't managed to get Functional Utilities to work yet
|
|
46
|
+
*********************/
|
|
47
|
+
/* @utility shadow-x-* {
|
|
48
|
+
--shadow-x: --value([integer]);
|
|
49
|
+
} */
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@utility text-stroke {
|
|
2
|
+
@supports (-webkit-text-stroke-width: 1px) {
|
|
3
|
+
/* Need to adjust this font size?? */
|
|
4
|
+
|
|
5
|
+
/* font-size: calc(1em - var(--stroke-width, 0.1em) / 2); */
|
|
6
|
+
-webkit-text-stroke-width: var(--stroke-width, 0.1em);
|
|
7
|
+
-webkit-text-stroke-color: var(--stroke-color);
|
|
8
|
+
paint-order: stroke fill;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Extends Text-stroke */
|
|
13
|
+
|
|
14
|
+
/* Sets color to background color and stroke to actual color you want for the stroke */
|
|
15
|
+
@utility text-outline {
|
|
16
|
+
color: var(--stroke-color); /* fallback */
|
|
17
|
+
|
|
18
|
+
@supports (-webkit-text-stroke-width: 1px) {
|
|
19
|
+
font-size: calc(1em - var(--stroke-width, 0.1em) / 2);
|
|
20
|
+
color: var(--bg-color);
|
|
21
|
+
-webkit-text-stroke-width: var(--stroke-width, 2px);
|
|
22
|
+
|
|
23
|
+
/* // We cannot use currentcolor because current color is set to --bg-color. That's why we need a --stroke variable */
|
|
24
|
+
-webkit-text-stroke-color: var(--stroke-color);
|
|
25
|
+
paint-order: stroke fill;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@utility input-container {
|
|
2
|
+
& {
|
|
3
|
+
--padding: 0.25em 0.5em;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 0.25em;
|
|
7
|
+
|
|
8
|
+
:where(.label) {
|
|
9
|
+
color: var(--text-color, inherit);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where(.hint) {
|
|
13
|
+
opacity: 0.5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.error) {
|
|
17
|
+
color: red;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@utility input-group {
|
|
23
|
+
& {
|
|
24
|
+
@apply pigment;
|
|
25
|
+
position: relative;
|
|
26
|
+
display: flex;
|
|
27
|
+
|
|
28
|
+
/* Allow all inner items to use the same padding values */
|
|
29
|
+
> *,
|
|
30
|
+
> :where(astro-slot, astro-content, astro-island) > * {
|
|
31
|
+
padding: var(--padding);
|
|
32
|
+
border-width: 0;
|
|
33
|
+
border-radius: 0;
|
|
34
|
+
|
|
35
|
+
/* Raise position for nicer focus */
|
|
36
|
+
&:focus,
|
|
37
|
+
&:focus-visible {
|
|
38
|
+
z-index: 2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:first-child {
|
|
42
|
+
border-start-start-radius: calc(var(--radius) - var(--border-width));
|
|
43
|
+
border-end-start-radius: calc(var(--radius) - var(--border-width));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:last-child {
|
|
47
|
+
border-start-end-radius: calc(var(--radius) - var(--border-width));
|
|
48
|
+
border-end-end-radius: calc(var(--radius) - var(--border-width));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Use this when you want the button or arrow to be floating over the input element. When doing this, make sure you set a minimum width for the input! (or input-group) */
|
|
55
|
+
.input-group.stack {
|
|
56
|
+
/* Before elements *
|
|
57
|
+
*********************/
|
|
58
|
+
*:has(~ :where(.input)),
|
|
59
|
+
*:has(~ :where(.input)):where(astro-slot, astro-content, astro-island) > * {
|
|
60
|
+
z-index: 2;
|
|
61
|
+
display: flex;
|
|
62
|
+
place-self: center start;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* After elements *
|
|
66
|
+
*********************/
|
|
67
|
+
:where(.input) ~ *,
|
|
68
|
+
:where(.input) ~ *:where(astro-slot, astro-content, astro-island) > * {
|
|
69
|
+
display: flex;
|
|
70
|
+
place-self: center end;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--textarea-height: 9em;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
textarea {
|
|
7
|
+
min-height: var(--textarea-height);
|
|
8
|
+
resize: vertical;
|
|
9
|
+
field-sizing: normal; /* Allows textarea to auto */
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/*********************
|
|
14
|
+
* Autogrowing Textarea,
|
|
15
|
+
Feature to be implemented again *
|
|
16
|
+
*********************/
|
|
17
|
+
/* @layer components { */
|
|
18
|
+
/* .replica { */
|
|
19
|
+
/* This is how textarea text behaves */
|
|
20
|
+
/* white-space: pre-wrap; */
|
|
21
|
+
|
|
22
|
+
/* Hidden from view, clicks, and screen readers */
|
|
23
|
+
/* visibility: hidden; */
|
|
24
|
+
|
|
25
|
+
/* &::after { */
|
|
26
|
+
/* content: attr(data-replicated-value) ' '; */
|
|
27
|
+
/* } */
|
|
28
|
+
/* } */
|
|
29
|
+
/* } */
|
|
30
|
+
|
|
31
|
+
/* .textarea-autogrow { */
|
|
32
|
+
/* textarea { */
|
|
33
|
+
/* Prevents user from resizing so it doesn't screw up the auto resizing */
|
|
34
|
+
/* resize: none;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
}
|
|
37
|
+
} */
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// ========================
|
|
16
|
-
// Hides content visually.
|
|
17
|
-
// So it's only available to screen readers and bots 🤖
|
|
18
|
-
// Solution by Joe Watkins.
|
|
19
|
-
// @see https://zellwk.com/blog/hide-content-accessibly/
|
|
20
|
-
// ========================
|
|
1
|
+
/*********************
|
|
2
|
+
* Remove animations and transitions *
|
|
3
|
+
@see https://hankchizljaw.com/wrote/a-modern-css-reset/
|
|
4
|
+
========================
|
|
5
|
+
*********************/
|
|
6
|
+
@layer base {
|
|
7
|
+
/*********************
|
|
8
|
+
* Hides content visually. *
|
|
9
|
+
So it's only available to screen readers and bots 🤖
|
|
10
|
+
Solution by Joe Watkins.
|
|
11
|
+
@see https://zellwk.com/blog/hide-content-accessibly/
|
|
12
|
+
**********************/
|
|
21
13
|
.sr-only {
|
|
22
14
|
overflow: hidden;
|
|
23
15
|
position: absolute;
|
|
@@ -29,4 +21,13 @@
|
|
|
29
21
|
clip: rect(0 0 0 0);
|
|
30
22
|
white-space: nowrap;
|
|
31
23
|
}
|
|
24
|
+
|
|
25
|
+
@media (prefers-reduced-motion: reduce) {
|
|
26
|
+
* {
|
|
27
|
+
animation-duration: 0.01ms !important;
|
|
28
|
+
animation-iteration-count: 1 !important;
|
|
29
|
+
transition-duration: 0.01ms !important;
|
|
30
|
+
scroll-behavior: auto !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
32
33
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@utility button {
|
|
2
|
+
& {
|
|
3
|
+
@apply pigment-with-svg;
|
|
4
|
+
flex-shrink: 0; /* Prevents button from shrinking when used in flex elements */
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.5em;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
padding: 0.25em 1em;
|
|
11
|
+
font: inherit;
|
|
12
|
+
font-family: var(--input-font);
|
|
13
|
+
text-decoration: none !important;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
* {
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
svg path {
|
|
21
|
+
@apply transition-scaffold;
|
|
22
|
+
transition: var(--transition-values);
|
|
23
|
+
transition-property: var(--transition-props);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@utility button-icon {
|
|
29
|
+
& {
|
|
30
|
+
padding: var(--padding, 0.5em);
|
|
31
|
+
line-height: 1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@layer utilities {
|
|
36
|
+
a {
|
|
37
|
+
@apply pigment;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
a:where(:not(.button)) {
|
|
41
|
+
--border-color: transparent;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
button {
|
|
45
|
+
@apply button;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* focus states with outlines */
|
|
49
|
+
:is(a, button, .button),
|
|
50
|
+
:where([tabindex]:not([tabindex='-1'])) {
|
|
51
|
+
&:focus-visible {
|
|
52
|
+
@apply outline-visible;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@layer base {
|
|
2
|
+
fieldset {
|
|
3
|
+
border: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* Text inputs */
|
|
7
|
+
input:where(
|
|
8
|
+
[type='text'],
|
|
9
|
+
[type='search'],
|
|
10
|
+
[type='email'],
|
|
11
|
+
[type='password'],
|
|
12
|
+
[type='tel'],
|
|
13
|
+
[type='url']
|
|
14
|
+
),
|
|
15
|
+
textarea,
|
|
16
|
+
select,
|
|
17
|
+
.field {
|
|
18
|
+
@apply pigment;
|
|
19
|
+
@apply border-scaffold;
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
padding: 0.25em 0.5em;
|
|
23
|
+
font: inherit;
|
|
24
|
+
font-family: var(--input-font);
|
|
25
|
+
color: var(--text-color, currentcolor);
|
|
26
|
+
background-color: var(--bg-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
input,
|
|
30
|
+
textarea {
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
@apply outline-visible;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Friendly password dots */
|
|
37
|
+
|
|
38
|
+
/* See https://pqina.nl/blog/styling-password-field-dots/ */
|
|
39
|
+
input[type='password'] {
|
|
40
|
+
font-family: Verdana, sans-serif;
|
|
41
|
+
letter-spacing: 0.125em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* disabled and readonly states */
|
|
45
|
+
.disabled,
|
|
46
|
+
.readonly,
|
|
47
|
+
[disabled],
|
|
48
|
+
[readonly] {
|
|
49
|
+
opacity: 0.5;
|
|
50
|
+
|
|
51
|
+
&:where(input) {
|
|
52
|
+
/* Super simple way. Styles can be improved. */
|
|
53
|
+
cursor: not-allowed;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Prevents users from focusing on them */
|
|
57
|
+
&:focus,
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline-color: transparent;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@layer base {
|
|
2
|
+
/*********************
|
|
3
|
+
* HTML and Body *
|
|
4
|
+
* We don't set a default typography size here because it's better for the user to set it in the root of the project.
|
|
5
|
+
*********************/
|
|
6
|
+
html {
|
|
7
|
+
font-family: system-ui, sans-serif;
|
|
8
|
+
line-height: var(--leading, 1.5);
|
|
9
|
+
font-variant-ligatures: common-ligatures;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
color: var(--text-color);
|
|
14
|
+
background-color: var(--bg-color);
|
|
15
|
+
text-rendering: optimizelegibility;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*********************
|
|
19
|
+
* Nicer Headers *
|
|
20
|
+
*********************/
|
|
21
|
+
h1,
|
|
22
|
+
h2,
|
|
23
|
+
h3,
|
|
24
|
+
h4,
|
|
25
|
+
h5,
|
|
26
|
+
h6 {
|
|
27
|
+
font-variant-numeric: oldstyle-nums proportional-nums;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
pre {
|
|
31
|
+
padding: 1em;
|
|
32
|
+
border-radius: var(--radius);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
code {
|
|
36
|
+
font-size: 0.8em;
|
|
37
|
+
|
|
38
|
+
:not(pre) > & {
|
|
39
|
+
display: inline;
|
|
40
|
+
padding: 0.2em 0.25em;
|
|
41
|
+
border-radius: var(--radius);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
pre > & {
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@utility flex-grid {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-flow: row wrap;
|
|
4
|
+
gap: var(--gap, 1rem);
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
|
|
7
|
+
> *,
|
|
8
|
+
> *:where(astro-island, astro-slot) > *,
|
|
9
|
+
> :where(.contents) > * {
|
|
10
|
+
--one-column: var(--gap, 1rem) * (var(--cols, 1) - 1);
|
|
11
|
+
flex: var(--grow, var(--span, 1)) var(--span, 1)
|
|
12
|
+
calc(
|
|
13
|
+
(100% - var(--one-column)) / var(--cols, 1) * var(--span, 1) +
|
|
14
|
+
(var(--span, 1) - 1) * var(--gap, 1rem)
|
|
15
|
+
);
|
|
16
|
+
min-width: min(100%, var(--item-width, 3rem));
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@utility flex-grid-gallery {
|
|
22
|
+
& {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-flow: row wrap;
|
|
25
|
+
gap: var(--gap, 1rem);
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
|
|
28
|
+
> * {
|
|
29
|
+
flex: 1 1 0px;
|
|
30
|
+
min-width: var(--item-width, 3rem);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--cols: 1;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@utility grid-scaffold {
|
|
6
|
+
& {
|
|
7
|
+
--span: 1; /* Revert to default span for children in nested grids */
|
|
8
|
+
display: grid;
|
|
9
|
+
gap: var(--gap-y, var(--gap, 1rem)) var(--gap-x, var(--gap, 1rem));
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
|
|
12
|
+
/* width: 100%; */
|
|
13
|
+
/* margin-inline: auto; */
|
|
14
|
+
|
|
15
|
+
> *,
|
|
16
|
+
> *:where(.contents) > *,
|
|
17
|
+
> *:where(astro-island, astro-slot) > * {
|
|
18
|
+
--cols: 1; /* Reset cols */
|
|
19
|
+
grid-column: var(--colstart, auto) / span var(--span, 1);
|
|
20
|
+
grid-row: var(--rowstart, auto) / span var(--rowspan, 1);
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/*********************
|
|
27
|
+
* Simple Grid and Repeat Auto *
|
|
28
|
+
*********************/
|
|
29
|
+
@utility grid-simple {
|
|
30
|
+
@apply grid-scaffold;
|
|
31
|
+
grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@utility grid-repeat-auto {
|
|
35
|
+
@apply grid-scaffold;
|
|
36
|
+
grid-template-columns: repeat(var(--cols, 1), minmax(0, auto));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*********************
|
|
40
|
+
* Fr Auto / Auto Fr *
|
|
41
|
+
* These are often used with :md modifier
|
|
42
|
+
*********************/
|
|
43
|
+
@utility grid-fr-auto {
|
|
44
|
+
@apply grid-scaffold;
|
|
45
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, auto);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@utility grid-auto-fr {
|
|
49
|
+
@apply grid-scaffold;
|
|
50
|
+
grid-template-columns: minmax(0, auto) minmax(0, 1fr);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@utility grid-with-breakout {
|
|
54
|
+
& {
|
|
55
|
+
@apply grid-scaffold;
|
|
56
|
+
grid-template-columns:
|
|
57
|
+
[breakout-start] 1fr [content-start] repeat(
|
|
58
|
+
var(--cols, 1),
|
|
59
|
+
minmax(0, 1fr)
|
|
60
|
+
)
|
|
61
|
+
[content-end] 1fr [breakout-end];
|
|
62
|
+
|
|
63
|
+
> *:not([class*='breakout-full']) {
|
|
64
|
+
grid-column: content-start / content-end;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
> *:where(.breakout-full) {
|
|
68
|
+
grid-column: breakout-start / breakout-end;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/*********************
|
|
74
|
+
* Galleries *
|
|
75
|
+
*********************/
|
|
76
|
+
@utility grid-gallery {
|
|
77
|
+
@apply grid-scaffold;
|
|
78
|
+
grid-template-columns: repeat(
|
|
79
|
+
var(--fit, auto-fill),
|
|
80
|
+
minmax(min(var(--item-width, 3rem), 100%), 1fr)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@utility grid-gallery-fit {
|
|
85
|
+
@apply grid-gallery;
|
|
86
|
+
--fit: auto-fit;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@utility grid-gallery-fill {
|
|
90
|
+
@apply grid-gallery;
|
|
91
|
+
--fit: auto-fill;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/*********************
|
|
95
|
+
* Useful grid utilities *
|
|
96
|
+
*********************/
|
|
97
|
+
@utility dense {
|
|
98
|
+
grid-auto-flow: dense;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@utility dense-column {
|
|
102
|
+
grid-auto-columns: dense;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@utility dense-row {
|
|
106
|
+
grid-auto-rows: dense;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/*********************
|
|
110
|
+
* Two Column Alternate Grid *
|
|
111
|
+
*********************/
|
|
112
|
+
|
|
113
|
+
@utility grid-alternate {
|
|
114
|
+
& {
|
|
115
|
+
&[data-start='left'] {
|
|
116
|
+
:where(& ~ .grid-alternate:nth-child(even)) .right-col {
|
|
117
|
+
order: -1;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&[data-start='right'] {
|
|
122
|
+
:where(&, & ~ .grid-alternate:nth-child(odd)) .right-col {
|
|
123
|
+
order: -1;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@utility masonry {
|
|
2
|
+
& {
|
|
3
|
+
@apply grid-repeat-auto;
|
|
4
|
+
grid-template-rows: masonry;
|
|
5
|
+
|
|
6
|
+
> *,
|
|
7
|
+
> *:where(.contents) > *,
|
|
8
|
+
> *:where(astro-island, astro-slot) > * {
|
|
9
|
+
grid-column-end: span var(--span, 1);
|
|
10
|
+
align-self: start;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@utility masonry-gallery {
|
|
16
|
+
& {
|
|
17
|
+
@apply masonry;
|
|
18
|
+
grid-template-columns: repeat(
|
|
19
|
+
auto-fill,
|
|
20
|
+
minmax(min(var(--item-width, 3rem), 100%), 1fr)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@utility subgrid-scaffold {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: inherit;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@utility subgrid {
|
|
7
|
+
@apply subgrid-columns;
|
|
8
|
+
@apply subgrid-rows;
|
|
9
|
+
grid-template-columns: subgrid;
|
|
10
|
+
grid-template-rows: subgrid;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@utility subgrid-columns {
|
|
14
|
+
@apply subgrid-scaffold;
|
|
15
|
+
grid-column: var(--start, auto) / span var(--span, 1);
|
|
16
|
+
grid-template-columns: subgrid;
|
|
17
|
+
|
|
18
|
+
> *:not([class*='subgrid']) {
|
|
19
|
+
grid-column-end: span var(--ispan, 1);
|
|
20
|
+
width: 100%;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@utility subgrid-rows {
|
|
26
|
+
@apply subgrid-scaffold;
|
|
27
|
+
grid-row: var(--rowstart, auto) / span var(--rowspan, 1);
|
|
28
|
+
grid-template-rows: subgrid;
|
|
29
|
+
|
|
30
|
+
> *:not([class*='subgrid']) {
|
|
31
|
+
grid-row-end: span var(--irowspan, 1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
@utility breakout-* {
|
|
3
|
+
margin-inline: --value(--spacing-*);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* prettier-ignore */
|
|
7
|
+
@utility breakout-x-* {
|
|
8
|
+
margin-inline: --value(--spacing-*);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* prettier-ignore */
|
|
12
|
+
@utility breakout-l-* {
|
|
13
|
+
margin-inline-start: --value(--spacing-*);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* prettier-ignore */
|
|
17
|
+
@utility breakout-r-* {
|
|
18
|
+
margin-inline-end: --value(--spacing-*);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/*********************
|
|
22
|
+
* Vertical breakouts *
|
|
23
|
+
*********************/
|
|
24
|
+
|
|
25
|
+
/* prettier-ignore */
|
|
26
|
+
@utility breakout-y-* {
|
|
27
|
+
margin-block: --value(--spacing-*);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* prettier-ignore */
|
|
31
|
+
@utility breakout-t-* {
|
|
32
|
+
margin-block-start: --value(--spacing-*);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* prettier-ignore */
|
|
36
|
+
@utility breakout-b-* {
|
|
37
|
+
margin-block-end: --value(--spacing-*);
|
|
38
|
+
}
|