@splendidlabz/styles 2.2.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/.stylelintrc.js +3 -0
- package/.turbo/turbo-lint.log +4 -0
- package/Base/_Accessibility.scss +32 -0
- package/Base/_Base.scss +57 -0
- package/Base/_Focus.scss +38 -0
- package/Base/_Transition.scss +8 -0
- package/Base/_index.scss +4 -0
- package/CHANGELOG.md +56 -0
- package/Components/_Box.scss +9 -0
- package/Components/_BrowserFrame.scss +89 -0
- package/Components/_Figure.scss +5 -0
- package/Components/_List.scss +19 -0
- package/Components/_Prose.scss +82 -0
- package/Components/_Scrollbars.scss +40 -0
- package/Components/_SimpleSVG.scss +9 -0
- package/Components/_index.scss +12 -0
- package/Effects/_Backdrop.scss +4 -0
- package/Effects/_Elevation.scss +92 -0
- package/Effects/_Glow.scss +51 -0
- package/Effects/_Gradients.scss +88 -0
- package/Effects/_Shadows.scss +51 -0
- package/Effects/_SpecialShadows.scss +45 -0
- package/Effects/_Text-Outline.scss +25 -0
- package/Effects/_index.scss +12 -0
- package/Experimental/_SimplePricingPlan.scss +141 -0
- package/Forms/_Button.scss +106 -0
- package/Forms/_Combobox.scss +49 -0
- package/Forms/_FormBase.scss +43 -0
- package/Forms/_FormControls.scss +95 -0
- package/Forms/_Range.scss +101 -0
- package/Forms/_Select.scss +114 -0
- package/Forms/_Switch.scss +66 -0
- package/Forms/_TextField.scss +116 -0
- package/Forms/_Textarea.scss +41 -0
- package/Forms/_index.scss +10 -0
- package/Typography/_WritingMode.scss +33 -0
- package/Typography/_index.scss +1 -0
- package/UI/Codepen.scss +11 -0
- package/UI/Tweet.scss +5 -0
- package/UI/Youtube.scss +13 -0
- package/UI/_Accordion.scss +33 -0
- package/UI/_Breadcrumbs.scss +24 -0
- package/UI/_CQChecker.scss +16 -0
- package/UI/_Callout.scss +31 -0
- package/UI/_Drawer.scss +28 -0
- package/UI/_Dropdown.scss +14 -0
- package/UI/_FancyList.scss +30 -0
- package/UI/_PerspectiveHover.scss +9 -0
- package/UI/_Popover.scss +25 -0
- package/UI/_Resizer.scss +43 -0
- package/UI/_Spotlight.scss +42 -0
- package/UI/_Status.scss +33 -0
- package/UI/_Tabs.scss +112 -0
- package/UI/_Textwall.scss +22 -0
- package/UI/_index.scss +17 -0
- package/Utilities/_Shapes.scss +20 -0
- package/Utilities/_index.scss +1 -0
- package/Variables/_Globals.scss +33 -0
- package/Variables/_index.scss +1 -0
- package/_Animations.scss +18 -0
- package/_Fill.scss +314 -0
- package/package.json +18 -0
- package/styles.scss +12 -0
- package/utils/_index.scss +3 -0
- package/utils/_mixins.scss +6 -0
- package/utils/functions/_fns.scss +77 -0
- package/utils/functions/_fonts.scss +114 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Gradient Defaults
|
|
2
|
+
@layer components {
|
|
3
|
+
:root {
|
|
4
|
+
--gradient-shape: ;
|
|
5
|
+
--gradient-size: ;
|
|
6
|
+
--angle: 90deg;
|
|
7
|
+
--gradient-position: center;
|
|
8
|
+
--color-space: oklab;
|
|
9
|
+
--hue-interpolation: ;
|
|
10
|
+
--gradient: ;
|
|
11
|
+
--gradient-alpha: 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@layer utilities {
|
|
16
|
+
// Gradient utilities
|
|
17
|
+
.gradient {
|
|
18
|
+
background-image: linear-gradient(
|
|
19
|
+
var(--angle),
|
|
20
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
@supports (linear-gradient(in oklab)) {
|
|
24
|
+
background: linear-gradient(
|
|
25
|
+
var(--angle) in var(--color-space) var(--hue-interpolation),
|
|
26
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.radial-gradient {
|
|
32
|
+
background-image: radial-gradient(
|
|
33
|
+
var(--gradient-shape) var(--gradient-size) at var(--gradient-position),
|
|
34
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.conic-gradient {
|
|
39
|
+
background-image: conic-gradient(
|
|
40
|
+
from var(--angle) at var(--gradient-position),
|
|
41
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ========================
|
|
46
|
+
// Repeating gradients
|
|
47
|
+
// Needs testing
|
|
48
|
+
// ========================
|
|
49
|
+
.repeating-gradient {
|
|
50
|
+
background-image: repeating-linear-gradient(
|
|
51
|
+
var(--angle),
|
|
52
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
@supports (linear-gradient(in oklab)) {
|
|
56
|
+
background-image: repeating-linear-gradient(
|
|
57
|
+
var(--angle) in var(--color-space) var(--hue-interpolation),
|
|
58
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.repeating-radial-gradient {
|
|
64
|
+
// Example
|
|
65
|
+
// --gradient: black, black 5px, white 5px, white 10px;
|
|
66
|
+
background-image: repeating-radial-gradient(
|
|
67
|
+
var(--gradient-shape) var(--gradient-size) at var(--gradient-position),
|
|
68
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.repeating-conic-gradient {
|
|
73
|
+
// Example
|
|
74
|
+
// --gradient: red 0%, yellow 15%, red 33%;
|
|
75
|
+
background-image: repeating-conic-gradient(
|
|
76
|
+
from var(--angle) at var(--gradient-position),
|
|
77
|
+
var(--tw-gradient-stops, var(--gradient))
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.text-gradient {
|
|
82
|
+
display: inline-flex;
|
|
83
|
+
-webkit-text-fill-color: transparent;
|
|
84
|
+
background-clip: text;
|
|
85
|
+
// Allows multiline gradients in Safari
|
|
86
|
+
box-decoration-break: clone;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Shadow defaults
|
|
2
|
+
// --shadow-x: 0;
|
|
3
|
+
// --shadow-y: 0;
|
|
4
|
+
// --shadow-blur: 0;
|
|
5
|
+
// --shadow-spread: 0;
|
|
6
|
+
// --shadow-color: transparent;
|
|
7
|
+
// --text-shadow-x: 0;
|
|
8
|
+
// --text-shadow-y: 0;
|
|
9
|
+
// --text-shadow-blur: 0;
|
|
10
|
+
// --text-shadow-color: transparent;
|
|
11
|
+
// --drop-shadow-x: 0;
|
|
12
|
+
// --drop-shadow-y: 0;
|
|
13
|
+
// --drop-shadow-blur: 0;
|
|
14
|
+
// --drop-shadow-color: transparent;
|
|
15
|
+
|
|
16
|
+
@layer utilities {
|
|
17
|
+
.Shadow {
|
|
18
|
+
--shadow-string: var(--shadow-x, 0) var(--shadow-y, 0) var(--shadow-blur, 0)
|
|
19
|
+
var(--shadow-spread, 0) var(--shadow-color, var(--tw-shadow-color));
|
|
20
|
+
box-shadow: var(--shadow, var(--shadow-string));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Textshadow {
|
|
24
|
+
--text-shadow-string: var(--text-shadow-x, 0) var(--text-shadow-y, 0)
|
|
25
|
+
var(--text-shadow-blur, 0) var(--text-shadow-color);
|
|
26
|
+
text-shadow: var(--text-shadow, var(--text-shadow-string));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.Dropshadow {
|
|
30
|
+
--drop-shadow-string: var(--drop-shadow-x, 0) var(--drop-shadow-y, 0)
|
|
31
|
+
var(--drop-shadow-blur, 0) var(--drop-shadow-color);
|
|
32
|
+
|
|
33
|
+
filter: drop-shadow(var(--drop-shadow, var(--drop-shadow-string)));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// .text-shadow {
|
|
37
|
+
// --drop-shadow-blur: 4px;
|
|
38
|
+
// --drop-shadow-color: black;
|
|
39
|
+
// filter: drop-shadow(0 0 var(--drop-shadow-blur) var(--drop-shadow-color));
|
|
40
|
+
// }
|
|
41
|
+
|
|
42
|
+
// Once stabilized, add to Tailwind config
|
|
43
|
+
// .text-glow {
|
|
44
|
+
// --drop-shadow-blur: 1px;
|
|
45
|
+
// --drop-shadow-color: currentcolor;
|
|
46
|
+
// filter: drop-shadow(
|
|
47
|
+
// var(--drop-shadow-x) var(--drop-shadow-y) var(--drop-shadow-blur)
|
|
48
|
+
// var(--drop-shadow-color)
|
|
49
|
+
// );
|
|
50
|
+
// }
|
|
51
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use 'sass:list';
|
|
3
|
+
|
|
4
|
+
// Calculate Shadow
|
|
5
|
+
// Inspiration from https://www.joshwcomeau.com/css/designing-shadows/
|
|
6
|
+
@function Shadow(
|
|
7
|
+
$elevation: 1,
|
|
8
|
+
$shadowLength: 2,
|
|
9
|
+
$lightAngle: 0deg,
|
|
10
|
+
$blurMultiplier: 1.3
|
|
11
|
+
) {
|
|
12
|
+
$offset: math.pow($elevation, 1.1) * $shadowLength;
|
|
13
|
+
$x: $offset * math.sin($lightAngle) * -1px;
|
|
14
|
+
$y: $offset * math.cos($lightAngle) * 1px;
|
|
15
|
+
$blur: $offset * $blurMultiplier * 1px;
|
|
16
|
+
$spread: $blur * -0.125;
|
|
17
|
+
|
|
18
|
+
@return $x $y $blur $spread var(--shadow-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin Shadow($elevation: 1, $lightAngle: 0deg, $shadowLength: 2) {
|
|
22
|
+
box-shadow: Shadow(
|
|
23
|
+
$elevation: $elevation,
|
|
24
|
+
$shadowLength: $shadowLength,
|
|
25
|
+
$lightAngle: $lightAngle
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@mixin StackedShadow($elevation: 1, $lightAngle: 0deg, $shadowLength: 2) {
|
|
30
|
+
$shadow: ();
|
|
31
|
+
|
|
32
|
+
@for $i from 1 through $elevation {
|
|
33
|
+
$shadow: list.append(
|
|
34
|
+
$shadow,
|
|
35
|
+
Shadow(
|
|
36
|
+
$elevation: $i,
|
|
37
|
+
$shadowLength: $shadowLength,
|
|
38
|
+
$lightAngle: $lightAngle,
|
|
39
|
+
),
|
|
40
|
+
$separator: 'comma'
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
box-shadow: $shadow;
|
|
45
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.Text-stroke {
|
|
3
|
+
@supports (-webkit-text-stroke-width: 1px) {
|
|
4
|
+
// font-size: calc(1em - var(--stroke-width, 0.1em) / 2);
|
|
5
|
+
-webkit-text-stroke-width: var(--stroke-width, 0.1em);
|
|
6
|
+
-webkit-text-stroke-color: var(--stroke-color);
|
|
7
|
+
paint-order: stroke fill;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Extends Text-stroke
|
|
12
|
+
// Sets color to background color and stroke to actual color you want for the stroke
|
|
13
|
+
.Text-outline {
|
|
14
|
+
color: var(--stroke-color); // fallback
|
|
15
|
+
|
|
16
|
+
@supports (-webkit-text-stroke-width: 1px) {
|
|
17
|
+
font-size: calc(1em - var(--stroke-width, 0.1em) / 2);
|
|
18
|
+
color: var(--bg-color);
|
|
19
|
+
-webkit-text-stroke-width: var(--stroke-width, 2px);
|
|
20
|
+
// We cannot use currentcolor because current color is set to --bg-color. That's why we need a --stroke variable
|
|
21
|
+
-webkit-text-stroke-color: var(--stroke-color);
|
|
22
|
+
paint-order: stroke fill;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// ========================
|
|
2
|
+
// Effects
|
|
3
|
+
// ========================
|
|
4
|
+
// Make your components nicer by introducing Shadows, Gradients, and other Effects. These effects can be applied to any component.
|
|
5
|
+
// Most of these are still experimental at this point
|
|
6
|
+
@use 'Elevation';
|
|
7
|
+
@use 'Glow';
|
|
8
|
+
@use 'Gradients';
|
|
9
|
+
@use 'Shadows';
|
|
10
|
+
@use 'SpecialShadows';
|
|
11
|
+
@use 'Text-Outline';
|
|
12
|
+
@use 'Backdrop';
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// ========================
|
|
2
|
+
// Plan
|
|
3
|
+
// ========================
|
|
4
|
+
.PlanLayout {
|
|
5
|
+
display: grid;
|
|
6
|
+
align-content: center;
|
|
7
|
+
gap: 1rem;
|
|
8
|
+
|
|
9
|
+
// We only create a 3-column layout after 1000px width
|
|
10
|
+
@media (width >= 1000px) {
|
|
11
|
+
grid-template-columns: repeat(3, 1fr);
|
|
12
|
+
grid-template-rows: repeat(3, auto);
|
|
13
|
+
|
|
14
|
+
> * {
|
|
15
|
+
grid-row: 1/-1;
|
|
16
|
+
grid-template-rows: subgrid;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.Plan {
|
|
22
|
+
--border-width: 4px;
|
|
23
|
+
--radius: 1rem;
|
|
24
|
+
--border-color: #ccc;
|
|
25
|
+
--bg-color: white;
|
|
26
|
+
--bg-color-darker: #fafafa;
|
|
27
|
+
|
|
28
|
+
display: grid;
|
|
29
|
+
gap: inherit;
|
|
30
|
+
padding: 1.5rem 1rem;
|
|
31
|
+
border: var(--border-width) solid var(--border-color);
|
|
32
|
+
border-radius: var(--radius);
|
|
33
|
+
color: color(mine);
|
|
34
|
+
background-color: var(--bg-color);
|
|
35
|
+
|
|
36
|
+
svg path {
|
|
37
|
+
fill: color(mine);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Plans have a different style below 1000px breakpoint
|
|
41
|
+
// We're using breakpoints because container queries don't work with subgrid
|
|
42
|
+
// Oh! But why don't we try after a certain amount then container queries? 🤔
|
|
43
|
+
@media (550px <= width < 1000px) {
|
|
44
|
+
grid-template-columns: 1.5fr 1fr;
|
|
45
|
+
|
|
46
|
+
.Plan-body {
|
|
47
|
+
grid-column: 2;
|
|
48
|
+
grid-row: span 2;
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-flow: column;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
margin: -1rem -0.5rem;
|
|
53
|
+
padding-inline: inherit;
|
|
54
|
+
border: 1px solid var(--border-color);
|
|
55
|
+
border-radius: calc(var(--radius) - 0.5rem);
|
|
56
|
+
background-color: var(--bg-color-darker);
|
|
57
|
+
place-self: stretch stretch;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:hover .Plan-body,
|
|
61
|
+
&:focus .Plan-body {
|
|
62
|
+
background-color: var(--bg-color-darker-hover);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (width >= 1000px) or (width < 550px) {
|
|
67
|
+
.Plan-header {
|
|
68
|
+
text-align: center;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.Plan:not(.Plan--Recommended) {
|
|
74
|
+
&:hover,
|
|
75
|
+
&:focus {
|
|
76
|
+
--border-color: #99c48e;
|
|
77
|
+
--bg-color: #f8fff6;
|
|
78
|
+
--bg-color-darker: #f8fff6;
|
|
79
|
+
--bg-color-darker-hover: #ebf7e7;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.Plan-recommended {
|
|
84
|
+
position: absolute;
|
|
85
|
+
font-size: 0.6rem;
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
background-color: var(--recommended-background-color);
|
|
88
|
+
|
|
89
|
+
@media (width <= 550px) {
|
|
90
|
+
transform: translateX(-50%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Show as a pill
|
|
94
|
+
@media (width < 1000px) {
|
|
95
|
+
top: calc(-0.5rem - 0.5lh + 2px); // Padding, line height and borders
|
|
96
|
+
display: inline-block;
|
|
97
|
+
margin-bottom: -1.5rem;
|
|
98
|
+
padding: 0.25rem 0.5rem;
|
|
99
|
+
border: 3px solid var(--border-color);
|
|
100
|
+
border-radius: 2em;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
letter-spacing: 0.05em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Show recommended above plan
|
|
106
|
+
@media (width >=1000px) {
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: 0;
|
|
109
|
+
left: calc(-1 * var(--border-width));
|
|
110
|
+
right: calc(-1 * var(--border-width));
|
|
111
|
+
padding: 0.5rem;
|
|
112
|
+
border: var(--border-width) solid var(--border-color);
|
|
113
|
+
border-top-left-radius: var(--radius);
|
|
114
|
+
border-top-right-radius: var(--radius);
|
|
115
|
+
font-weight: bold;
|
|
116
|
+
letter-spacing: 0.075em;
|
|
117
|
+
transform: translateY(-100%);
|
|
118
|
+
text-align: center;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// ========================
|
|
123
|
+
// Accents for plans
|
|
124
|
+
// ========================
|
|
125
|
+
.Plan--Recommended {
|
|
126
|
+
--border-color: #7198c8;
|
|
127
|
+
--recommended-background-color: #c5e2ff;
|
|
128
|
+
--bg-color: #edf6ff;
|
|
129
|
+
--bg-color-darker: #e1f0ff;
|
|
130
|
+
--bg-color-darker-hover: #d4e7fb;
|
|
131
|
+
|
|
132
|
+
&:hover,
|
|
133
|
+
&:focus {
|
|
134
|
+
background-color: #e7f3ff;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (width >= 1000px) {
|
|
138
|
+
border-top-left-radius: 0;
|
|
139
|
+
border-top-right-radius: 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// ========================
|
|
2
|
+
// Reset Button and base styles
|
|
3
|
+
// ========================
|
|
4
|
+
@layer components {
|
|
5
|
+
button,
|
|
6
|
+
[class*='Button'] {
|
|
7
|
+
flex-shrink: 0; // Prevents button from shrinking when used in flex elements
|
|
8
|
+
// align-self: start; // Prevents buttons from expanding to 100% size when used in flex elements. Specify align-self:stretch to expand to full width. This is problematic in Horizontal flow.
|
|
9
|
+
justify-content: center;
|
|
10
|
+
padding: 0.25em 1em;
|
|
11
|
+
border-width: var(--border-width, 1px);
|
|
12
|
+
border-color: var(--border-color);
|
|
13
|
+
border-radius: var(--radius);
|
|
14
|
+
font: var(--input-font, inherit);
|
|
15
|
+
color: var(--text-color, currentColor);
|
|
16
|
+
background-color: var(--bg-color, #eee);
|
|
17
|
+
text-decoration: none !important;
|
|
18
|
+
transition: var(--transition-values);
|
|
19
|
+
transition-property: var(--transition-props);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
|
|
22
|
+
* {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
svg path {
|
|
27
|
+
transition: var(--transition-values);
|
|
28
|
+
transition-property: var(--transition-props);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Ruleset here is the same as .Fill.
|
|
32
|
+
// We are duplicating because CSS doesn't have Tailwind's @apply functionality.
|
|
33
|
+
&:hover {
|
|
34
|
+
border-color: var(--border-hover-color, var(--border-color));
|
|
35
|
+
color: var(--text-hover-color, var(--text-color));
|
|
36
|
+
background-color: var(--bg-hover-color, var(--bg-color));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Fallback to hover color
|
|
40
|
+
&:focus {
|
|
41
|
+
border-color: var(
|
|
42
|
+
--border-focus-color,
|
|
43
|
+
var(--border-hover-color, var(--border-color))
|
|
44
|
+
);
|
|
45
|
+
color: var(
|
|
46
|
+
--text-focus-color,
|
|
47
|
+
var(--text-hover-color, var(--text-color))
|
|
48
|
+
);
|
|
49
|
+
background-color: var(
|
|
50
|
+
--bg-focus-color,
|
|
51
|
+
var(--bg-hover-color, var(--bg-color))
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Fallback to hover color
|
|
56
|
+
&:active {
|
|
57
|
+
border-color: var(
|
|
58
|
+
--border-active-color,
|
|
59
|
+
var(--border-hover-color, var(--border-color))
|
|
60
|
+
);
|
|
61
|
+
color: var(
|
|
62
|
+
--text-active-color,
|
|
63
|
+
var(--text-hover-color, var(--text-color))
|
|
64
|
+
);
|
|
65
|
+
background-color: var(
|
|
66
|
+
--bg-active-color,
|
|
67
|
+
var(--bg-hover-color, var(--bg-color))
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Fallback to hover color
|
|
72
|
+
&.selected,
|
|
73
|
+
&[aria-selected],
|
|
74
|
+
&[aria-expanded='true'] {
|
|
75
|
+
border-color: var(
|
|
76
|
+
--border-selected-color,
|
|
77
|
+
var(--border-hover-color, var(--border-color))
|
|
78
|
+
);
|
|
79
|
+
color: var(
|
|
80
|
+
--text-selected-color,
|
|
81
|
+
var(--text-hover-color, var(--text-color))
|
|
82
|
+
);
|
|
83
|
+
background-color: var(
|
|
84
|
+
--bg-selected-color,
|
|
85
|
+
var(--bg-hover-color, var(--bg-color))
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ========================
|
|
91
|
+
// Base Splendid Labz Buttons
|
|
92
|
+
// ========================
|
|
93
|
+
[class*='Button'] {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: 0.5em;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// For using Icons as the button content
|
|
101
|
+
@layer components {
|
|
102
|
+
.Button-icon {
|
|
103
|
+
padding: var(--padding, 0.5em);
|
|
104
|
+
line-height: 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.ListboxPopover {
|
|
2
|
+
padding: 0;
|
|
3
|
+
border: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[role='listbox'] {
|
|
7
|
+
max-height: 15rem; // Default value. Specify as you wish in CSS
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
|
|
10
|
+
[role='option'] {
|
|
11
|
+
cursor: pointer; // Ensures cursor stays as pointer even when hovering over text
|
|
12
|
+
> * {
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[aria-selected='true'] {
|
|
18
|
+
background: var(--bg-selected-color, pink);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// @layer components {
|
|
23
|
+
.AutocompleteOptions {
|
|
24
|
+
.ComboboxMatchedString {
|
|
25
|
+
font-weight: bold;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Needs fixing again.
|
|
30
|
+
// Transition for AutocompleteLoader and AutocompleteEmpty. Relies on :empty state and @starting-style for transitions.
|
|
31
|
+
.AutocompleteLoader,
|
|
32
|
+
.AutocompleteEmpty {
|
|
33
|
+
transition: var(--transition);
|
|
34
|
+
transition-property: var(--transition-props), display;
|
|
35
|
+
transition-behavior: allow-discrete;
|
|
36
|
+
|
|
37
|
+
@starting-style {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:empty {
|
|
42
|
+
display: none;
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.TimepickerOptions .Listbox li {
|
|
48
|
+
padding: 0.5rem 1rem;
|
|
49
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
// Text based inputs
|
|
3
|
+
input:where(
|
|
4
|
+
[type='text'],
|
|
5
|
+
[type='search'],
|
|
6
|
+
[type='email'],
|
|
7
|
+
[type='password'],
|
|
8
|
+
[type='tel'],
|
|
9
|
+
[type='url']
|
|
10
|
+
),
|
|
11
|
+
textarea,
|
|
12
|
+
select,
|
|
13
|
+
.Field {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 100%;
|
|
16
|
+
border-radius: inherit;
|
|
17
|
+
font: inherit;
|
|
18
|
+
font-family: var(--input-font, inherit);
|
|
19
|
+
color: var(--text-color, currentColor);
|
|
20
|
+
background-color: var(--bg-color, transparent);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Friendly password dots
|
|
24
|
+
// See https://pqina.nl/blog/styling-password-field-dots/
|
|
25
|
+
input[type='password'] {
|
|
26
|
+
font-family: Verdana, sans-serif;
|
|
27
|
+
letter-spacing: 0.125em;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.disabled,
|
|
31
|
+
.readonly,
|
|
32
|
+
[disabled],
|
|
33
|
+
[readonly] {
|
|
34
|
+
opacity: 0.5; // Super simple way. Styles can be improved.
|
|
35
|
+
&:where(input) {
|
|
36
|
+
cursor: not-allowed;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus-visible {
|
|
40
|
+
outline-color: transparent;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// ========================
|
|
2
|
+
// Checkboxes and Radios
|
|
3
|
+
// ========================
|
|
4
|
+
@layer components {
|
|
5
|
+
.Legend + * {
|
|
6
|
+
margin-top: 0.25rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.Radio,
|
|
10
|
+
.Checkbox {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--gap, 0.5em);
|
|
14
|
+
|
|
15
|
+
:where(&) + :where(&) {
|
|
16
|
+
margin-top: 0.125em;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// For both checkbox and radios
|
|
20
|
+
> :where(.Checkmark, .Radiomark) {
|
|
21
|
+
display: grid;
|
|
22
|
+
place-items: center;
|
|
23
|
+
|
|
24
|
+
> * {
|
|
25
|
+
grid-column: 1;
|
|
26
|
+
grid-row: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
> input {
|
|
30
|
+
appearance: none;
|
|
31
|
+
display: grid;
|
|
32
|
+
place-content: center;
|
|
33
|
+
width: var(--width, var(--size, 1em));
|
|
34
|
+
height: var(--height, var(--size, 1em));
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
border: var(--border-width, 1px) var(--border-style, solid)
|
|
38
|
+
var(--border-color, black);
|
|
39
|
+
font: inherit;
|
|
40
|
+
background-color: var(--bg-color, transparent);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
svg {
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
width: 0.85em;
|
|
46
|
+
height: 0.85em;
|
|
47
|
+
fill: var(--fill-color, none);
|
|
48
|
+
transform: scale(0);
|
|
49
|
+
transition: transform var(--transition-values);
|
|
50
|
+
|
|
51
|
+
path {
|
|
52
|
+
stroke: var(--stroke-color, pink);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(.Checkmark, .Radiomark) ~ .TextInput {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where(.Checkmark:has(:checked), .Radiomark:has(:checked)) ~ .TextInput {
|
|
62
|
+
display: block;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Checkboxes
|
|
66
|
+
:where(input[type='checkbox']) {
|
|
67
|
+
border-radius: var(--checkbox-radius, 0.25em);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// SVG
|
|
71
|
+
:where(input:checked) ~ svg {
|
|
72
|
+
transform: scale(1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Radios only
|
|
76
|
+
:where(input[type='radio']) {
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Default radio
|
|
81
|
+
:where(.radio) {
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
width: 0.5em;
|
|
84
|
+
height: 0.5em;
|
|
85
|
+
border-radius: 50%;
|
|
86
|
+
background-color: var(--stroke-color, pink);
|
|
87
|
+
transform: scale(0);
|
|
88
|
+
transition: transform var(--transition-values);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:where(input[type='radio']:checked ~ .radio) {
|
|
92
|
+
transform: scale(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|