farvist 0.5.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/LICENSE +21 -0
- package/README.md +324 -0
- package/assets/farvist.js +187 -0
- package/assets/icons/farvist-icons.svg +49 -0
- package/assets/logo.svg +11 -0
- package/assets/og-image.svg +34 -0
- package/assets/patterns/blob.svg +9 -0
- package/assets/patterns/dots.svg +3 -0
- package/assets/patterns/grid.svg +3 -0
- package/assets/patterns/mesh.svg +20 -0
- package/dist/farvist.css +8967 -0
- package/dist/farvist.min.css +1 -0
- package/package.json +53 -0
- package/scss/abstracts/_functions.scss +85 -0
- package/scss/abstracts/_index.scss +9 -0
- package/scss/abstracts/_mixins.scss +78 -0
- package/scss/abstracts/_variables.scss +252 -0
- package/scss/base/_reset.scss +120 -0
- package/scss/base/_root.scss +87 -0
- package/scss/base/_typography.scss +102 -0
- package/scss/components/_accordion.scss +64 -0
- package/scss/components/_alerts.scss +63 -0
- package/scss/components/_avatar.scss +76 -0
- package/scss/components/_badges.scss +54 -0
- package/scss/components/_breadcrumb.scss +44 -0
- package/scss/components/_buttons.scss +163 -0
- package/scss/components/_callout.scss +37 -0
- package/scss/components/_cards.scss +74 -0
- package/scss/components/_chip.scss +61 -0
- package/scss/components/_dropdown.scss +90 -0
- package/scss/components/_empty-state.scss +37 -0
- package/scss/components/_forms.scss +125 -0
- package/scss/components/_icon.scss +25 -0
- package/scss/components/_list-group.scss +60 -0
- package/scss/components/_modal.scss +95 -0
- package/scss/components/_navbar.scss +67 -0
- package/scss/components/_pagination.scss +51 -0
- package/scss/components/_progress.scss +60 -0
- package/scss/components/_range.scss +58 -0
- package/scss/components/_rating.scss +26 -0
- package/scss/components/_segmented.scss +51 -0
- package/scss/components/_skeleton.scss +52 -0
- package/scss/components/_spinner.scss +60 -0
- package/scss/components/_stat.scss +32 -0
- package/scss/components/_stepper.scss +78 -0
- package/scss/components/_switch.scss +65 -0
- package/scss/components/_table.scss +51 -0
- package/scss/components/_tabs.scss +64 -0
- package/scss/components/_timeline.scss +77 -0
- package/scss/components/_toast.scss +79 -0
- package/scss/components/_tooltip.scss +45 -0
- package/scss/farvist.scss +60 -0
- package/scss/layout/_grid.scss +83 -0
- package/scss/utilities/_backgrounds.scss +110 -0
- package/scss/utilities/_effects.scss +118 -0
- package/scss/utilities/_spacing.scss +76 -0
- package/scss/utilities/_utilities.scss +213 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Farvist · Utilities · Backgrounds ★ free-tier headline feature ★
|
|
3
|
+
// Mesh gradients, patterns, spotlights, fade-masks and animated drift — the
|
|
4
|
+
// things Tailwind and Bootstrap make you hand-roll. All token-driven and
|
|
5
|
+
// theme-aware. Compose them: `class="bg-grid bg-fade"`, `class="bg-mesh-aurora bg-drift"`.
|
|
6
|
+
// =============================================================================
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
@use '../abstracts' as *;
|
|
10
|
+
|
|
11
|
+
// -- Mesh gradient backdrops (generated from the $bg-meshes map) --------------
|
|
12
|
+
@each $name, $layers in $bg-meshes {
|
|
13
|
+
.bg-mesh-#{$name} {
|
|
14
|
+
background-color: var(--fv-body-bg);
|
|
15
|
+
background-image: $layers;
|
|
16
|
+
background-repeat: no-repeat;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// `.bg-mesh` defaults to aurora.
|
|
20
|
+
.bg-mesh {
|
|
21
|
+
background-color: var(--fv-body-bg);
|
|
22
|
+
background-image: map.get($bg-meshes, 'aurora');
|
|
23
|
+
background-repeat: no-repeat;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// -- Pattern backgrounds (theme-aware via --fv-glass-border) -------------------
|
|
27
|
+
.bg-grid {
|
|
28
|
+
background-image:
|
|
29
|
+
linear-gradient(var(--fv-bg-pattern) 1px, transparent 1px),
|
|
30
|
+
linear-gradient(90deg, var(--fv-bg-pattern) 1px, transparent 1px);
|
|
31
|
+
background-size: 2rem 2rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.bg-graph {
|
|
35
|
+
background-image:
|
|
36
|
+
linear-gradient(var(--fv-bg-pattern) 1px, transparent 1px),
|
|
37
|
+
linear-gradient(90deg, var(--fv-bg-pattern) 1px, transparent 1px);
|
|
38
|
+
background-size: 0.75rem 0.75rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bg-dots {
|
|
42
|
+
background-image: radial-gradient(var(--fv-bg-pattern) 1.2px, transparent 1.2px);
|
|
43
|
+
background-size: 1.25rem 1.25rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.bg-lines {
|
|
47
|
+
background-image: repeating-linear-gradient(
|
|
48
|
+
45deg,
|
|
49
|
+
var(--fv-bg-pattern) 0, var(--fv-bg-pattern) 1px,
|
|
50
|
+
transparent 1px, transparent 12px
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Subtle film grain via an inline SVG fractal-noise (no external file needed).
|
|
55
|
+
.bg-noise {
|
|
56
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Pattern tile-size modifiers.
|
|
60
|
+
.bg-pattern-sm { background-size: 1rem 1rem; }
|
|
61
|
+
.bg-pattern-lg { background-size: 3rem 3rem; }
|
|
62
|
+
|
|
63
|
+
// -- Spotlight (radial glow, themeable per color) -----------------------------
|
|
64
|
+
.bg-spotlight {
|
|
65
|
+
background-color: var(--fv-body-bg);
|
|
66
|
+
background-image: radial-gradient(42rem 26rem at 50% -12%, rgba($primary, 0.30), transparent 70%);
|
|
67
|
+
background-repeat: no-repeat;
|
|
68
|
+
}
|
|
69
|
+
// Chromatic colors only — the light/dark surface tokens make no glow.
|
|
70
|
+
@each $name, $clr in map.remove($theme-colors, 'light', 'dark') {
|
|
71
|
+
.bg-spotlight-#{$name} {
|
|
72
|
+
background-color: var(--fv-body-bg);
|
|
73
|
+
background-image: radial-gradient(42rem 26rem at 50% -12%, rgba($clr, 0.30), transparent 70%);
|
|
74
|
+
background-repeat: no-repeat;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// -- Fade masks ----------------------------------------------------------------
|
|
79
|
+
// NOTE: `mask-image` fades the WHOLE element incl. its children, so put these on
|
|
80
|
+
// a dedicated decorative layer (an empty/absolutely-positioned div), not on a box
|
|
81
|
+
// that holds text. Best with the transparent-base PATTERNS (`.bg-grid.bg-fade`);
|
|
82
|
+
// over an opaque `.bg-mesh-*`/`.bg-spotlight*` the fade reveals the parent, not
|
|
83
|
+
// the surface — fade the section's background layer instead.
|
|
84
|
+
.bg-fade {
|
|
85
|
+
-webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 35%, transparent 100%);
|
|
86
|
+
mask-image: radial-gradient(ellipse 80% 65% at 50% 0%, #000 35%, transparent 100%);
|
|
87
|
+
}
|
|
88
|
+
.bg-fade-b {
|
|
89
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
|
|
90
|
+
mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
|
|
91
|
+
}
|
|
92
|
+
.bg-fade-x {
|
|
93
|
+
-webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
|
|
94
|
+
mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// -- Animated drift (for .bg-mesh-* / .bg-spotlight* — not the tiled patterns) -
|
|
98
|
+
// It forces background-size:150%, which would blow up a pattern's fixed tile size.
|
|
99
|
+
@keyframes fv-bg-drift {
|
|
100
|
+
0%, 100% { background-position: 0% 0%; }
|
|
101
|
+
50% { background-position: 100% 100%; }
|
|
102
|
+
}
|
|
103
|
+
.bg-drift {
|
|
104
|
+
background-size: 150% 150%;
|
|
105
|
+
animation: fv-bg-drift 22s ease-in-out infinite;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (prefers-reduced-motion: reduce) {
|
|
109
|
+
.bg-drift { animation: none; }
|
|
110
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Farvist · Utilities · Futuristic effects
|
|
3
|
+
// Glass, neon glow, gradients and motion — generated from the token maps.
|
|
4
|
+
// =============================================================================
|
|
5
|
+
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../abstracts' as *;
|
|
8
|
+
|
|
9
|
+
// -- Glass surfaces -----------------------------------------------------------
|
|
10
|
+
.glass { @include glass; }
|
|
11
|
+
.glass-strong { @include glass($strong: true); }
|
|
12
|
+
|
|
13
|
+
// Strip blur when you want a plain translucent panel.
|
|
14
|
+
.glass-flat {
|
|
15
|
+
backdrop-filter: none;
|
|
16
|
+
-webkit-backdrop-filter: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// -- Gradient backgrounds (from the $gradients map) ---------------------------
|
|
20
|
+
@each $name, $grad in $gradients {
|
|
21
|
+
.bg-gradient-#{$name} {
|
|
22
|
+
background-image: $grad !important;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// -- Gradient text ------------------------------------------------------------
|
|
27
|
+
// `-webkit-text-fill-color` keeps the glyphs transparent even if a `.text-*`
|
|
28
|
+
// color utility (which sets `color !important`) lands on the same element.
|
|
29
|
+
.text-gradient {
|
|
30
|
+
background-image: var(--fv-gradient-primary);
|
|
31
|
+
-webkit-background-clip: text;
|
|
32
|
+
background-clip: text;
|
|
33
|
+
color: transparent;
|
|
34
|
+
-webkit-text-fill-color: transparent;
|
|
35
|
+
}
|
|
36
|
+
@each $name, $grad in $gradients {
|
|
37
|
+
.text-gradient-#{$name} {
|
|
38
|
+
background-image: $grad;
|
|
39
|
+
-webkit-background-clip: text;
|
|
40
|
+
background-clip: text;
|
|
41
|
+
color: transparent;
|
|
42
|
+
-webkit-text-fill-color: transparent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Light theme: the vivid gradients are tuned for a dark page; darken the
|
|
47
|
+
// clipped text so it stays legible on the near-white background.
|
|
48
|
+
[data-theme='light'] [class*='text-gradient'] {
|
|
49
|
+
filter: brightness(0.5) saturate(1.4);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// -- Neon glows (from the $glows map) -----------------------------------------
|
|
53
|
+
@each $name, $glow in $glows {
|
|
54
|
+
.glow-#{$name} { box-shadow: $glow !important; }
|
|
55
|
+
}
|
|
56
|
+
.glow { box-shadow: var(--fv-glow-primary) !important; }
|
|
57
|
+
.glow-none { box-shadow: none !important; }
|
|
58
|
+
|
|
59
|
+
// Text glow (neon halo on the type itself).
|
|
60
|
+
.text-glow {
|
|
61
|
+
text-shadow: 0 0 18px rgba($primary, 0.65);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// (Background patterns/meshes/spotlights live in utilities/_backgrounds.scss.)
|
|
65
|
+
|
|
66
|
+
// -- Motion -------------------------------------------------------------------
|
|
67
|
+
.hover-lift {
|
|
68
|
+
transition: transform $transition-base, box-shadow $transition-base;
|
|
69
|
+
|
|
70
|
+
&:hover {
|
|
71
|
+
transform: translateY(-4px);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@keyframes fv-gradient-pan {
|
|
76
|
+
0% { background-position: 0% 50%; }
|
|
77
|
+
50% { background-position: 100% 50%; }
|
|
78
|
+
100% { background-position: 0% 50%; }
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Pair with a .bg-gradient-* class for a slowly drifting gradient.
|
|
82
|
+
.bg-animated {
|
|
83
|
+
background-size: 200% 200%;
|
|
84
|
+
animation: fv-gradient-pan 9s ease infinite;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes fv-float {
|
|
88
|
+
0%, 100% { transform: translateY(0); }
|
|
89
|
+
50% { transform: translateY(-10px); }
|
|
90
|
+
}
|
|
91
|
+
.animate-float {
|
|
92
|
+
animation: fv-float 6s ease-in-out infinite;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// -- Graceful degradation -----------------------------------------------------
|
|
96
|
+
// When the browser can't blur, fall back to an opaque surface so glass panels
|
|
97
|
+
// stay legible instead of washing out.
|
|
98
|
+
// NB: alerts are intentionally excluded — their translucent colored tint is
|
|
99
|
+
// legible without a blur, and overriding it here would flatten every variant
|
|
100
|
+
// to one opaque surface and erase the semantic color.
|
|
101
|
+
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
102
|
+
.glass,
|
|
103
|
+
.glass-strong,
|
|
104
|
+
.navbar,
|
|
105
|
+
.card,
|
|
106
|
+
.form-control,
|
|
107
|
+
.form-select {
|
|
108
|
+
background-color: var(--fv-surface-solid);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Respect reduced-motion for the decorative animations.
|
|
113
|
+
@media (prefers-reduced-motion: reduce) {
|
|
114
|
+
.bg-animated,
|
|
115
|
+
.animate-float {
|
|
116
|
+
animation: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Farvist · Utilities · Spacing
|
|
3
|
+
// The flagship generator: nested `@each` loops stamp out margin & padding
|
|
4
|
+
// utilities for every side, every step of the spacing scale, at every
|
|
5
|
+
// breakpoint — e.g. .mt-3, .px-4, .m-md-5, .py-lg-0, plus negatives & autos.
|
|
6
|
+
//
|
|
7
|
+
// property abbrev m = margin p = padding
|
|
8
|
+
// side abbrev t = top e = end/right b = bottom s = start/left
|
|
9
|
+
// x = inline (left+right) y = block (top+bottom)
|
|
10
|
+
// ''= all sides
|
|
11
|
+
// =============================================================================
|
|
12
|
+
|
|
13
|
+
@use 'sass:map';
|
|
14
|
+
@use '../abstracts' as *;
|
|
15
|
+
|
|
16
|
+
// Side abbreviation -> the physical property/properties it sets.
|
|
17
|
+
$spacing-sides: (
|
|
18
|
+
't': top,
|
|
19
|
+
'e': right,
|
|
20
|
+
'b': bottom,
|
|
21
|
+
's': left,
|
|
22
|
+
'x': (left, right),
|
|
23
|
+
'y': (top, bottom),
|
|
24
|
+
'': all,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
@each $bp in map.keys($grid-breakpoints) {
|
|
28
|
+
$infix: breakpoint-infix($bp);
|
|
29
|
+
|
|
30
|
+
@include media-up($bp) {
|
|
31
|
+
// property loop: margin (m) and padding (p)
|
|
32
|
+
@each $prop, $abbrev in (margin: 'm', padding: 'p') {
|
|
33
|
+
// scale loop: every step of $spacers
|
|
34
|
+
@each $size, $length in $spacers {
|
|
35
|
+
// side loop: t / e / b / s / x / y / all
|
|
36
|
+
@each $side, $targets in $spacing-sides {
|
|
37
|
+
.#{$abbrev}#{$side}#{$infix}-#{$size} {
|
|
38
|
+
@if $targets == all {
|
|
39
|
+
#{$prop}: $length !important;
|
|
40
|
+
} @else {
|
|
41
|
+
@each $target in $targets {
|
|
42
|
+
#{$prop}-#{$target}: $length !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Negative margins (handy for pulling elements over gutters).
|
|
51
|
+
@each $size, $length in $spacers {
|
|
52
|
+
@if $length != 0 {
|
|
53
|
+
.m#{$infix}-n#{$size} { margin: -$length !important; }
|
|
54
|
+
.mt#{$infix}-n#{$size} { margin-top: -$length !important; }
|
|
55
|
+
.mb#{$infix}-n#{$size} { margin-bottom: -$length !important; }
|
|
56
|
+
.ms#{$infix}-n#{$size} { margin-left: -$length !important; }
|
|
57
|
+
.me#{$infix}-n#{$size} { margin-right: -$length !important; }
|
|
58
|
+
.mx#{$infix}-n#{$size} {
|
|
59
|
+
margin-left: -$length !important;
|
|
60
|
+
margin-right: -$length !important;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Auto margins for centering / pushing.
|
|
66
|
+
.m#{$infix}-auto { margin: auto !important; }
|
|
67
|
+
.mt#{$infix}-auto { margin-top: auto !important; }
|
|
68
|
+
.mb#{$infix}-auto { margin-bottom: auto !important; }
|
|
69
|
+
.ms#{$infix}-auto { margin-left: auto !important; }
|
|
70
|
+
.me#{$infix}-auto { margin-right: auto !important; }
|
|
71
|
+
.mx#{$infix}-auto {
|
|
72
|
+
margin-left: auto !important;
|
|
73
|
+
margin-right: auto !important;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Farvist · Utilities · Everything else
|
|
3
|
+
// Generated, single-purpose helper classes. `@each` walks the token maps and
|
|
4
|
+
// `@for` produces numeric scales (opacity steps, sizing fractions).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
@use 'sass:math';
|
|
9
|
+
@use '../abstracts' as *;
|
|
10
|
+
|
|
11
|
+
// -- Display (responsive) -----------------------------------------------------
|
|
12
|
+
$display-values: none, block, inline, inline-block, flex, inline-flex, grid, table;
|
|
13
|
+
|
|
14
|
+
@each $bp in map.keys($grid-breakpoints) {
|
|
15
|
+
$infix: breakpoint-infix($bp);
|
|
16
|
+
@include media-up($bp) {
|
|
17
|
+
@each $value in $display-values {
|
|
18
|
+
.d#{$infix}-#{$value} { display: $value; }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// -- Flexbox (responsive) -----------------------------------------------------
|
|
24
|
+
$justify: (
|
|
25
|
+
'start': flex-start,
|
|
26
|
+
'end': flex-end,
|
|
27
|
+
'center': center,
|
|
28
|
+
'between': space-between,
|
|
29
|
+
'around': space-around,
|
|
30
|
+
'evenly': space-evenly,
|
|
31
|
+
);
|
|
32
|
+
$align: (
|
|
33
|
+
'start': flex-start,
|
|
34
|
+
'end': flex-end,
|
|
35
|
+
'center': center,
|
|
36
|
+
'baseline': baseline,
|
|
37
|
+
'stretch': stretch,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
@each $bp in map.keys($grid-breakpoints) {
|
|
41
|
+
$infix: breakpoint-infix($bp);
|
|
42
|
+
@include media-up($bp) {
|
|
43
|
+
.flex#{$infix}-row { flex-direction: row; }
|
|
44
|
+
.flex#{$infix}-row-reverse { flex-direction: row-reverse; }
|
|
45
|
+
.flex#{$infix}-column { flex-direction: column; }
|
|
46
|
+
.flex#{$infix}-column-reverse { flex-direction: column-reverse; }
|
|
47
|
+
.flex#{$infix}-wrap { flex-wrap: wrap; }
|
|
48
|
+
.flex#{$infix}-nowrap { flex-wrap: nowrap; }
|
|
49
|
+
.flex#{$infix}-fill { flex: 1 1 auto; }
|
|
50
|
+
.flex#{$infix}-grow-0 { flex-grow: 0; }
|
|
51
|
+
.flex#{$infix}-grow-1 { flex-grow: 1; }
|
|
52
|
+
.flex#{$infix}-shrink-0 { flex-shrink: 0; }
|
|
53
|
+
.flex#{$infix}-shrink-1 { flex-shrink: 1; }
|
|
54
|
+
|
|
55
|
+
@each $key, $value in $justify {
|
|
56
|
+
.justify-content#{$infix}-#{$key} { justify-content: $value; }
|
|
57
|
+
}
|
|
58
|
+
@each $key, $value in $align {
|
|
59
|
+
.align-items#{$infix}-#{$key} { align-items: $value; }
|
|
60
|
+
.align-self#{$infix}-#{$key} { align-self: $value; }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Gap utilities from the spacing scale.
|
|
66
|
+
@each $key, $value in $spacers {
|
|
67
|
+
.gap-#{$key} { gap: $value; }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// -- Text alignment (responsive) ---------------------------------------------
|
|
71
|
+
@each $bp in map.keys($grid-breakpoints) {
|
|
72
|
+
$infix: breakpoint-infix($bp);
|
|
73
|
+
@include media-up($bp) {
|
|
74
|
+
.text#{$infix}-start { text-align: left; }
|
|
75
|
+
.text#{$infix}-center { text-align: center; }
|
|
76
|
+
.text#{$infix}-end { text-align: right; }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// -- Type utilities -----------------------------------------------------------
|
|
81
|
+
@each $key, $size in $font-sizes {
|
|
82
|
+
.fs-#{$key} { font-size: $size; }
|
|
83
|
+
}
|
|
84
|
+
@each $key, $weight in $font-weights {
|
|
85
|
+
.fw-#{$key} { font-weight: $weight; }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.fst-italic { font-style: italic; }
|
|
89
|
+
.fst-normal { font-style: normal; }
|
|
90
|
+
.text-decoration-underline { text-decoration: underline; }
|
|
91
|
+
.text-decoration-none { text-decoration: none; }
|
|
92
|
+
.text-uppercase { text-transform: uppercase; }
|
|
93
|
+
.text-lowercase { text-transform: lowercase; }
|
|
94
|
+
.text-capitalize { text-transform: capitalize; }
|
|
95
|
+
.text-nowrap { white-space: nowrap; }
|
|
96
|
+
.text-break { overflow-wrap: break-word; }
|
|
97
|
+
.text-truncate {
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
text-overflow: ellipsis;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
}
|
|
102
|
+
.lh-1 { line-height: 1; }
|
|
103
|
+
.lh-base { line-height: $line-height-base; }
|
|
104
|
+
.lh-lg { line-height: 1.8; }
|
|
105
|
+
.font-monospace { font-family: $font-family-mono; }
|
|
106
|
+
|
|
107
|
+
// -- Color utilities ----------------------------------------------------------
|
|
108
|
+
@each $name, $clr in $theme-colors {
|
|
109
|
+
.text-#{$name} { color: $clr !important; }
|
|
110
|
+
.bg-#{$name} { background-color: $clr !important; }
|
|
111
|
+
.border-#{$name} { border-color: $clr !important; }
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.text-white { color: $white !important; }
|
|
115
|
+
.text-body { color: var(--fv-body-color) !important; }
|
|
116
|
+
.text-muted { color: var(--fv-muted) !important; }
|
|
117
|
+
.bg-white { background-color: $white !important; }
|
|
118
|
+
.bg-body { background-color: var(--fv-body-bg) !important; }
|
|
119
|
+
.bg-surface { background-color: var(--fv-surface-solid) !important; }
|
|
120
|
+
.bg-transparent { background-color: transparent !important; }
|
|
121
|
+
|
|
122
|
+
@each $key, $value in $grays {
|
|
123
|
+
.text-gray-#{$key} { color: $value !important; }
|
|
124
|
+
.bg-gray-#{$key} { background-color: $value !important; }
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// -- Borders ------------------------------------------------------------------
|
|
128
|
+
.border { border: $border-width solid var(--fv-border-color) !important; }
|
|
129
|
+
.border-0 { border: 0 !important; }
|
|
130
|
+
.border-top { border-top: $border-width solid var(--fv-border-color) !important; }
|
|
131
|
+
.border-end { border-right: $border-width solid var(--fv-border-color) !important; }
|
|
132
|
+
.border-bottom { border-bottom: $border-width solid var(--fv-border-color) !important; }
|
|
133
|
+
.border-start { border-left: $border-width solid var(--fv-border-color) !important; }
|
|
134
|
+
|
|
135
|
+
@each $key, $value in $radii {
|
|
136
|
+
.rounded-#{$key} { border-radius: $value !important; }
|
|
137
|
+
}
|
|
138
|
+
.rounded { border-radius: $border-radius !important; }
|
|
139
|
+
.rounded-0 { border-radius: 0 !important; }
|
|
140
|
+
.rounded-circle { border-radius: 50% !important; }
|
|
141
|
+
|
|
142
|
+
// -- Shadows ------------------------------------------------------------------
|
|
143
|
+
@each $key, $value in $shadows {
|
|
144
|
+
.shadow-#{$key} { box-shadow: $value !important; }
|
|
145
|
+
}
|
|
146
|
+
.shadow-none { box-shadow: none !important; }
|
|
147
|
+
|
|
148
|
+
// -- Sizing -------------------------------------------------------------------
|
|
149
|
+
// Fractional width/height built with an @for loop over quartiles.
|
|
150
|
+
@for $i from 1 through 4 {
|
|
151
|
+
$pct: math.percentage(math.div($i, 4));
|
|
152
|
+
.w-#{$i * 25} { width: $pct; }
|
|
153
|
+
.h-#{$i * 25} { height: $pct; }
|
|
154
|
+
}
|
|
155
|
+
.w-auto { width: auto; }
|
|
156
|
+
.h-auto { height: auto; }
|
|
157
|
+
.mw-100 { max-width: 100%; }
|
|
158
|
+
.mh-100 { max-height: 100%; }
|
|
159
|
+
.vw-100 { width: 100vw; }
|
|
160
|
+
.vh-100 { height: 100vh; }
|
|
161
|
+
.min-vh-100 { min-height: 100vh; }
|
|
162
|
+
|
|
163
|
+
// -- Position -----------------------------------------------------------------
|
|
164
|
+
@each $pos in static, relative, absolute, fixed, sticky {
|
|
165
|
+
.position-#{$pos} { position: $pos; }
|
|
166
|
+
}
|
|
167
|
+
.top-0 { top: 0; }
|
|
168
|
+
.bottom-0 { bottom: 0; }
|
|
169
|
+
.start-0 { left: 0; }
|
|
170
|
+
.end-0 { right: 0; }
|
|
171
|
+
.fixed-top {
|
|
172
|
+
position: fixed;
|
|
173
|
+
top: 0;
|
|
174
|
+
right: 0;
|
|
175
|
+
left: 0;
|
|
176
|
+
z-index: map.get($z-layers, 'fixed');
|
|
177
|
+
}
|
|
178
|
+
.sticky-top {
|
|
179
|
+
position: sticky;
|
|
180
|
+
top: 0;
|
|
181
|
+
z-index: map.get($z-layers, 'sticky');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// -- Z-index (from the layer map) --------------------------------------------
|
|
185
|
+
@each $key, $value in $z-layers {
|
|
186
|
+
.z-#{$key} { z-index: $value; }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// -- Opacity (generated with an @for loop, 0–100 in steps of 10) --------------
|
|
190
|
+
@for $i from 0 through 10 {
|
|
191
|
+
.opacity-#{$i * 10} { opacity: math.div($i, 10); }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// -- Overflow -----------------------------------------------------------------
|
|
195
|
+
@each $value in auto, hidden, visible, scroll {
|
|
196
|
+
.overflow-#{$value} { overflow: $value; }
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// -- Interaction & a11y -------------------------------------------------------
|
|
200
|
+
.visually-hidden { @include visually-hidden; }
|
|
201
|
+
.user-select-none { user-select: none; }
|
|
202
|
+
.user-select-all { user-select: all; }
|
|
203
|
+
.pe-none { pointer-events: none; }
|
|
204
|
+
.pe-auto { pointer-events: auto; }
|
|
205
|
+
.cursor-pointer { cursor: pointer; }
|
|
206
|
+
|
|
207
|
+
// -- Lists --------------------------------------------------------------------
|
|
208
|
+
.list-unstyled { padding-left: 0; list-style: none; }
|
|
209
|
+
.list-inline { padding-left: 0; list-style: none; }
|
|
210
|
+
.list-inline-item {
|
|
211
|
+
display: inline-block;
|
|
212
|
+
&:not(:last-child) { margin-right: spacer(2); }
|
|
213
|
+
}
|