@magmonium/one 0.0.4 → 0.0.5
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/package.json +2 -1
- package/sass/_date-picker.sass +147 -0
- package/sass/_index.sass +34 -0
- package/sass/_input-date.sass +25 -0
- package/sass/_m-components.sass +110 -0
- package/sass/_menu.sass +132 -0
- package/sass/_reset.sass +186 -0
- package/sass/animations/_index.sass +13 -0
- package/sass/animations/_registry.sass +51 -0
- package/sass/animations/background/_energy.sass +91 -0
- package/sass/animations/background/_gradient.sass +104 -0
- package/sass/animations/background/_index.sass +9 -0
- package/sass/animations/background/_nature.sass +110 -0
- package/sass/animations/background/_new-effects.sass +292 -0
- package/sass/animations/background/_particle.sass +122 -0
- package/sass/animations/background/_tech.sass +124 -0
- package/sass/functions/_functions.sass +107 -0
- package/sass/mixins/_backdrops.sass +230 -0
- package/sass/mixins/_backgrounds.sass +214 -0
- package/sass/mixins/_borders.sass +93 -0
- package/sass/mixins/_breakpoints.sass +68 -0
- package/sass/mixins/_button.sass +46 -0
- package/sass/mixins/_checkbox.sass +128 -0
- package/sass/mixins/_colors.sass +121 -0
- package/sass/mixins/_control.sass +13 -0
- package/sass/mixins/_device.sass +22 -0
- package/sass/mixins/_display.sass +210 -0
- package/sass/mixins/_flex.sass +104 -0
- package/sass/mixins/_form.sass +68 -0
- package/sass/mixins/_grid.sass +273 -0
- package/sass/mixins/_header.sass +71 -0
- package/sass/mixins/_index.sass +29 -0
- package/sass/mixins/_input.sass +132 -0
- package/sass/mixins/_interactive.sass +19 -0
- package/sass/mixins/_label.sass +25 -0
- package/sass/mixins/_layout.sass +251 -0
- package/sass/mixins/_links.sass +85 -0
- package/sass/mixins/_lists.sass +377 -0
- package/sass/mixins/_overflow.sass +121 -0
- package/sass/mixins/_position.sass +181 -0
- package/sass/mixins/_radio.sass +205 -0
- package/sass/mixins/_sizing.sass +181 -0
- package/sass/mixins/_spacing.sass +59 -0
- package/sass/mixins/_text.sass +159 -0
- package/sass/mixins/_toggle.sass +240 -0
- package/sass/mixins/_typography.sass +6 -0
- package/sass/mixins/_utilities.sass +70 -0
- package/sass/utilities/_backdrops.sass +228 -0
- package/sass/utilities/_backgrounds.sass +285 -0
- package/sass/utilities/_borders.sass +138 -0
- package/sass/utilities/_colors.sass +166 -0
- package/sass/utilities/_display.sass +308 -0
- package/sass/utilities/_flex.sass +91 -0
- package/sass/utilities/_grid.sass +502 -0
- package/sass/utilities/_index.sass +17 -0
- package/sass/utilities/_input.sass +14 -0
- package/sass/utilities/_links.sass +136 -0
- package/sass/utilities/_lists.sass +4 -0
- package/sass/utilities/_popup.sass +73 -0
- package/sass/utilities/_position.sass +88 -0
- package/sass/utilities/_sizing.sass +277 -0
- package/sass/utilities/_spacing.sass +121 -0
- package/sass/utilities/_text.sass +207 -0
- package/sass/variables/_animations.sass +5 -0
- package/sass/variables/_borders.sass +25 -0
- package/sass/variables/_colors.sass +93 -0
- package/sass/variables/_index.sass +6 -0
- package/sass/variables/_number.sass +1 -0
- package/sass/variables/_spacing.sass +28 -0
- package/sass/variables/_typography.sass +40 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@forward "typography"
|
|
2
|
+
@forward "device"
|
|
3
|
+
@forward "layout"
|
|
4
|
+
@forward "grid"
|
|
5
|
+
@forward "utilities"
|
|
6
|
+
@forward "spacing"
|
|
7
|
+
@forward "borders"
|
|
8
|
+
@forward "breakpoints"
|
|
9
|
+
@forward "button"
|
|
10
|
+
@forward "control"
|
|
11
|
+
@forward "flex"
|
|
12
|
+
@forward "position"
|
|
13
|
+
@forward "sizing"
|
|
14
|
+
@forward "display"
|
|
15
|
+
@forward "colors"
|
|
16
|
+
@forward "backgrounds"
|
|
17
|
+
@forward "backdrops"
|
|
18
|
+
@forward "overflow"
|
|
19
|
+
@forward "header"
|
|
20
|
+
@forward "links"
|
|
21
|
+
@forward "text"
|
|
22
|
+
@forward "lists"
|
|
23
|
+
@forward "toggle"
|
|
24
|
+
@forward "radio"
|
|
25
|
+
@forward "interactive"
|
|
26
|
+
@forward "input"
|
|
27
|
+
@forward "checkbox"
|
|
28
|
+
@forward "form"
|
|
29
|
+
@forward "label"
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
@use 'sass:math'
|
|
2
|
+
@use '../variables/colors' as *
|
|
3
|
+
@use '../functions/functions' as f
|
|
4
|
+
@use 'interactive' as *
|
|
5
|
+
@use 'control' as *
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
=input-text-base($size: 1em)
|
|
9
|
+
appearance: none
|
|
10
|
+
border: #{f.derive-control-border($size)} solid #ccc
|
|
11
|
+
border-radius: #{f.derive-control-radius($size)}
|
|
12
|
+
padding: #{f.derive-control-gap($size)} #{f.derive-control-padding-x($size)}
|
|
13
|
+
font-family: inherit
|
|
14
|
+
font-size: #{$size}
|
|
15
|
+
line-height: 1.5
|
|
16
|
+
color: $text
|
|
17
|
+
background-color: $background
|
|
18
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease
|
|
19
|
+
width: 100%
|
|
20
|
+
|
|
21
|
+
&:hover
|
|
22
|
+
border-color: $text-secondary
|
|
23
|
+
|
|
24
|
+
&:focus
|
|
25
|
+
outline: none
|
|
26
|
+
border-color: $focus
|
|
27
|
+
box-shadow: none
|
|
28
|
+
background-color: transparent
|
|
29
|
+
|
|
30
|
+
&.error
|
|
31
|
+
border-color: transparent
|
|
32
|
+
box-shadow: none
|
|
33
|
+
|
|
34
|
+
&:focus
|
|
35
|
+
border-color: transparent
|
|
36
|
+
box-shadow: none
|
|
37
|
+
|
|
38
|
+
&:disabled
|
|
39
|
+
opacity: 0.6
|
|
40
|
+
cursor: not-allowed
|
|
41
|
+
background-color: $frame
|
|
42
|
+
color: $text-tertiary
|
|
43
|
+
border-color: $border
|
|
44
|
+
|
|
45
|
+
& + label
|
|
46
|
+
opacity: 0.6
|
|
47
|
+
cursor: not-allowed
|
|
48
|
+
color: $text-tertiary
|
|
49
|
+
|
|
50
|
+
&[readonly]
|
|
51
|
+
cursor: default
|
|
52
|
+
border-color: $border
|
|
53
|
+
background-color: transparent
|
|
54
|
+
|
|
55
|
+
&:focus
|
|
56
|
+
box-shadow: none
|
|
57
|
+
border-color: $border
|
|
58
|
+
|
|
59
|
+
&::placeholder
|
|
60
|
+
color: $text-tertiary
|
|
61
|
+
opacity: 1
|
|
62
|
+
|
|
63
|
+
// Variant mixins
|
|
64
|
+
=input-text-small
|
|
65
|
+
$size: calc(1em * 0.5)
|
|
66
|
+
+input-text-base($size)
|
|
67
|
+
padding: #{f.derive-control-gap($size)} #{f.derive-control-padding-x($size, math.div(4, 3))}
|
|
68
|
+
font-size: 0.875rem
|
|
69
|
+
|
|
70
|
+
=input-text-large
|
|
71
|
+
$size: calc(1em * 1.5)
|
|
72
|
+
+input-text-base($size)
|
|
73
|
+
padding: #{f.derive-control-gap($size)} #{f.derive-control-padding-x($size, math.div(8, 9))}
|
|
74
|
+
font-size: 1.125rem
|
|
75
|
+
|
|
76
|
+
// Input wrapper mixin - shared by all .input-wrapper components
|
|
77
|
+
=input-wrapper
|
|
78
|
+
display: flex
|
|
79
|
+
align-items: center
|
|
80
|
+
background: $background
|
|
81
|
+
$size: 1em
|
|
82
|
+
+control-dims($size)
|
|
83
|
+
border-width: var(--m-input-border-width, 2px)
|
|
84
|
+
border-radius: var(--m-input-radius, 4px)
|
|
85
|
+
height: calc(var(--input-size, #{$size}) * 2.25)
|
|
86
|
+
min-height: calc(var(--input-size, #{$size}) * 2.25)
|
|
87
|
+
padding-top: 0
|
|
88
|
+
padding-bottom: 0
|
|
89
|
+
+control-interactive(var(--m-input-color, var(--m-mm)))
|
|
90
|
+
border-style: solid
|
|
91
|
+
backdrop-filter: var(--m-text-input-backdrop-filter, none)
|
|
92
|
+
-webkit-backdrop-filter: var(--m-text-input-backdrop-filter, none)
|
|
93
|
+
box-shadow: var(--m-text-input-shadow, none)
|
|
94
|
+
|
|
95
|
+
// trailing button/icon carries its own inset — drop wrapper right pad so it
|
|
96
|
+
// sits flush at the right edge like the dropdown's chevron. A leading icon
|
|
97
|
+
// precedes the input, so a trailing m-icon is always the last child.
|
|
98
|
+
&:has(
|
|
99
|
+
> m-one-button,
|
|
100
|
+
> m-button,
|
|
101
|
+
> .input-indicator,
|
|
102
|
+
> .input-suffix,
|
|
103
|
+
> m-icon:last-child
|
|
104
|
+
)
|
|
105
|
+
padding-right: 0
|
|
106
|
+
|
|
107
|
+
&:focus-visible:not(:disabled),
|
|
108
|
+
&:focus-within:not(:disabled)
|
|
109
|
+
border-color: var(--m-text-input-focus-border, #{$focus})
|
|
110
|
+
box-shadow: var(--m-text-input-shadow, none)
|
|
111
|
+
|
|
112
|
+
&:has(.error)
|
|
113
|
+
border-color: $error
|
|
114
|
+
box-shadow: none
|
|
115
|
+
|
|
116
|
+
&:has(.error):focus-within
|
|
117
|
+
border-color: $error
|
|
118
|
+
box-shadow: none
|
|
119
|
+
|
|
120
|
+
input, textarea
|
|
121
|
+
flex: 1
|
|
122
|
+
border: none
|
|
123
|
+
outline: none
|
|
124
|
+
background: transparent
|
|
125
|
+
color: $text
|
|
126
|
+
font-family: inherit
|
|
127
|
+
font-size: inherit
|
|
128
|
+
padding: 0
|
|
129
|
+
|
|
130
|
+
&:focus
|
|
131
|
+
border-color: transparent
|
|
132
|
+
box-shadow: none
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
=interactive-border($color, $focus: '&:focus-visible, &:focus-within')
|
|
2
|
+
border-color: #{$color}
|
|
3
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease
|
|
4
|
+
&:hover:not(:disabled)
|
|
5
|
+
border-color: color-mix(in srgb, #{$color} 45%, rgba(0, 0, 0, 0.12))
|
|
6
|
+
#{$focus}
|
|
7
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, #{$color} 20%, transparent)
|
|
8
|
+
|
|
9
|
+
=control-interactive($color)
|
|
10
|
+
border-color: #{$color}
|
|
11
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease
|
|
12
|
+
&:hover:not(:disabled)
|
|
13
|
+
background-color: color-mix(in srgb, #{$color} 6%, transparent)
|
|
14
|
+
&:focus-visible:not(:disabled),
|
|
15
|
+
&:focus-within:not(:disabled)
|
|
16
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, #{$color} 20%, transparent)
|
|
17
|
+
&:disabled
|
|
18
|
+
opacity: 0.6
|
|
19
|
+
cursor: not-allowed
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@use '../variables/colors' as *
|
|
2
|
+
|
|
3
|
+
=input-label
|
|
4
|
+
color: var(--m-input-wrapper-color, #4169e1)
|
|
5
|
+
transition: color 0.2s ease
|
|
6
|
+
display: inline-block
|
|
7
|
+
font-size: calc(1.25em * 0.7)
|
|
8
|
+
font-weight: 500
|
|
9
|
+
margin-bottom: calc(1.25em * 0.35)
|
|
10
|
+
cursor: pointer
|
|
11
|
+
line-height: 1.5
|
|
12
|
+
|
|
13
|
+
&.disabled
|
|
14
|
+
color: $text-secondary
|
|
15
|
+
|
|
16
|
+
&.required::before
|
|
17
|
+
content: '* '
|
|
18
|
+
color: $error
|
|
19
|
+
font-weight: 600
|
|
20
|
+
|
|
21
|
+
&.disabled::after
|
|
22
|
+
color: $text-secondary
|
|
23
|
+
|
|
24
|
+
&:has(+ input:focus)
|
|
25
|
+
color: $focus
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// Layout Mixins - Robust and Responsive Layout System
|
|
2
|
+
@use 'sass:math'
|
|
3
|
+
@use '../variables/spacing' as *
|
|
4
|
+
@use '../variables/colors' as *
|
|
5
|
+
@use '../functions/functions' as *
|
|
6
|
+
@use './breakpoints' as breakpoints
|
|
7
|
+
|
|
8
|
+
// ===========================================
|
|
9
|
+
// RESPONSIVE CONTAINER SYSTEM
|
|
10
|
+
// ===========================================
|
|
11
|
+
|
|
12
|
+
// Smart responsive container with automatic max-widths
|
|
13
|
+
@mixin responsive-container($padding: $container-padding-x, $max-widths: $container-max-widths)
|
|
14
|
+
width: 100%
|
|
15
|
+
margin-left: auto
|
|
16
|
+
margin-right: auto
|
|
17
|
+
padding-left: $padding
|
|
18
|
+
padding-right: $padding
|
|
19
|
+
|
|
20
|
+
// Apply max-widths at each breakpoint
|
|
21
|
+
@each $breakpoint, $max-width in $max-widths
|
|
22
|
+
@include breakpoints.media-breakpoint-up($breakpoint)
|
|
23
|
+
max-width: $max-width
|
|
24
|
+
|
|
25
|
+
// Adaptive padding that scales with screen size
|
|
26
|
+
@mixin responsive-padding($base: $spacer, $scale-factor: 0.5)
|
|
27
|
+
padding: $base * $scale-factor
|
|
28
|
+
|
|
29
|
+
@include breakpoints.media-breakpoint-up(sm)
|
|
30
|
+
padding: $base * ($scale-factor + 0.25)
|
|
31
|
+
|
|
32
|
+
@include breakpoints.media-breakpoint-up(md)
|
|
33
|
+
padding: $base
|
|
34
|
+
|
|
35
|
+
@include breakpoints.media-breakpoint-up(lg)
|
|
36
|
+
padding: $base * ($scale-factor + 1)
|
|
37
|
+
|
|
38
|
+
@include breakpoints.media-breakpoint-up(xl)
|
|
39
|
+
padding: $base * ($scale-factor + 1.5)
|
|
40
|
+
|
|
41
|
+
// Flexible responsive grid system
|
|
42
|
+
@mixin responsive-grid($columns: 1, $gap: $grid-gutter-width, $breakpoints: (sm: 2, md: 3, lg: 4, xl: 5))
|
|
43
|
+
display: grid
|
|
44
|
+
grid-template-columns: repeat($columns, 1fr)
|
|
45
|
+
gap: $gap
|
|
46
|
+
|
|
47
|
+
@each $breakpoint, $cols in $breakpoints
|
|
48
|
+
@include breakpoints.media-breakpoint-up($breakpoint)
|
|
49
|
+
grid-template-columns: repeat($cols, 1fr)
|
|
50
|
+
|
|
51
|
+
// ===========================================
|
|
52
|
+
// ROBUST LAYOUT UTILITIES
|
|
53
|
+
// ===========================================
|
|
54
|
+
|
|
55
|
+
// Advanced flexbox with responsive behavior and fallbacks
|
|
56
|
+
@mixin robust-flex($direction: row, $justify: flex-start, $align: stretch, $wrap: nowrap, $gap: 0)
|
|
57
|
+
display: flex
|
|
58
|
+
flex-direction: $direction
|
|
59
|
+
justify-content: $justify
|
|
60
|
+
align-items: $align
|
|
61
|
+
flex-wrap: $wrap
|
|
62
|
+
gap: $gap
|
|
63
|
+
|
|
64
|
+
// Fallback for older browsers without gap support
|
|
65
|
+
@supports not (gap: $gap)
|
|
66
|
+
margin: calc(-#{$gap} / 2)
|
|
67
|
+
|
|
68
|
+
> *
|
|
69
|
+
margin: calc(#{$gap} / 2)
|
|
70
|
+
|
|
71
|
+
// Responsive stack that switches between vertical/horizontal
|
|
72
|
+
@mixin responsive-stack($mobile-direction: column, $desktop-direction: row, $breakpoint: md, $gap: $spacer)
|
|
73
|
+
@include robust-flex($mobile-direction, flex-start, stretch, nowrap, $gap)
|
|
74
|
+
|
|
75
|
+
@include breakpoints.media-breakpoint-up($breakpoint)
|
|
76
|
+
flex-direction: $desktop-direction
|
|
77
|
+
|
|
78
|
+
// Smart spacing that adapts to screen size
|
|
79
|
+
@mixin adaptive-spacing($property: margin, $base: $spacer, $responsive: true)
|
|
80
|
+
#{$property}: $base * 0.5
|
|
81
|
+
|
|
82
|
+
@if $responsive
|
|
83
|
+
@include breakpoints.media-breakpoint-up(sm)
|
|
84
|
+
#{$property}: $base * 0.75
|
|
85
|
+
|
|
86
|
+
@include breakpoints.media-breakpoint-up(md)
|
|
87
|
+
#{$property}: $base
|
|
88
|
+
|
|
89
|
+
@include breakpoints.media-breakpoint-up(lg)
|
|
90
|
+
#{$property}: $base * 1.25
|
|
91
|
+
|
|
92
|
+
@include breakpoints.media-breakpoint-up(xl)
|
|
93
|
+
#{$property}: $base * 1.5
|
|
94
|
+
|
|
95
|
+
// ===========================================
|
|
96
|
+
// MODERN LAYOUT FEATURES
|
|
97
|
+
// ===========================================
|
|
98
|
+
|
|
99
|
+
// CSS Grid layout with responsive columns and gaps
|
|
100
|
+
@mixin css-grid-layout($min-column-width: 250px, $max-columns: none, $gap: $grid-gutter-width)
|
|
101
|
+
display: grid
|
|
102
|
+
gap: $gap
|
|
103
|
+
|
|
104
|
+
@if $max-columns
|
|
105
|
+
grid-template-columns: repeat(auto-fit, minmax($min-column-width, 1fr))
|
|
106
|
+
|
|
107
|
+
@include breakpoints.media-breakpoint-up(lg)
|
|
108
|
+
grid-template-columns: repeat(auto-fit, minmax($min-column-width, calc(100% / #{$max-columns})))
|
|
109
|
+
@else
|
|
110
|
+
grid-template-columns: repeat(auto-fit, minmax($min-column-width, 1fr))
|
|
111
|
+
|
|
112
|
+
// Multi-column layout with smart breakpoints
|
|
113
|
+
@mixin responsive-columns($columns: 2, $gap: $spacer, $min-width: 250px)
|
|
114
|
+
columns: 1
|
|
115
|
+
column-gap: $gap
|
|
116
|
+
column-fill: balance
|
|
117
|
+
|
|
118
|
+
@include breakpoints.media-breakpoint-up(sm)
|
|
119
|
+
@if $columns >= 2
|
|
120
|
+
columns: 2
|
|
121
|
+
|
|
122
|
+
@include breakpoints.media-breakpoint-up(md)
|
|
123
|
+
@if $columns >= 3
|
|
124
|
+
columns: 3
|
|
125
|
+
|
|
126
|
+
@include breakpoints.media-breakpoint-up(lg)
|
|
127
|
+
columns: $columns
|
|
128
|
+
|
|
129
|
+
// Prevent awkward breaks
|
|
130
|
+
> *
|
|
131
|
+
break-inside: avoid
|
|
132
|
+
margin-bottom: $gap
|
|
133
|
+
|
|
134
|
+
// Typography that scales responsively
|
|
135
|
+
@mixin adaptive-typography($base-size: 1rem, $scale-ratio: 1.2, $responsive: true)
|
|
136
|
+
font-size: $base-size
|
|
137
|
+
|
|
138
|
+
@if $responsive
|
|
139
|
+
@include breakpoints.media-breakpoint-up(sm)
|
|
140
|
+
font-size: $base-size * 1.05
|
|
141
|
+
|
|
142
|
+
@include breakpoints.media-breakpoint-up(md)
|
|
143
|
+
font-size: $base-size * 1.1
|
|
144
|
+
|
|
145
|
+
@include breakpoints.media-breakpoint-up(lg)
|
|
146
|
+
font-size: $base-size * $scale-ratio
|
|
147
|
+
|
|
148
|
+
@include breakpoints.media-breakpoint-up(xl)
|
|
149
|
+
font-size: $base-size * ($scale-ratio * 1.1)
|
|
150
|
+
|
|
151
|
+
// ===========================================
|
|
152
|
+
// NAVIGATION & UI MIXINS
|
|
153
|
+
// ===========================================
|
|
154
|
+
|
|
155
|
+
// Mobile-first navigation patterns
|
|
156
|
+
@mixin responsive-navigation($mobile-layout: stack, $desktop-layout: horizontal, $breakpoint: md)
|
|
157
|
+
@if $mobile-layout == stack
|
|
158
|
+
@include robust-flex(column, flex-start, stretch, nowrap, 0.5rem)
|
|
159
|
+
@else if $mobile-layout == horizontal
|
|
160
|
+
@include robust-flex(row, space-between, center, wrap, 0.5rem)
|
|
161
|
+
|
|
162
|
+
@include breakpoints.media-breakpoint-up($breakpoint)
|
|
163
|
+
@if $desktop-layout == horizontal
|
|
164
|
+
@include robust-flex(row, space-between, center, nowrap, 1rem)
|
|
165
|
+
@else if $desktop-layout == stack
|
|
166
|
+
@include robust-flex(column, flex-start, stretch, nowrap, 1rem)
|
|
167
|
+
|
|
168
|
+
// Card grid that adapts to screen size
|
|
169
|
+
@mixin adaptive-card-grid($min-card-width: 280px, $max-cards-per-row: 4, $gap: $spacer)
|
|
170
|
+
@include css-grid-layout($min-card-width, $max-cards-per-row, $gap)
|
|
171
|
+
|
|
172
|
+
// Card styling
|
|
173
|
+
> *
|
|
174
|
+
background: $white
|
|
175
|
+
border-radius: 0.375rem
|
|
176
|
+
padding: $spacer
|
|
177
|
+
box-shadow: 0 0.125rem 0.25rem rgba($black, 0.1)
|
|
178
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease
|
|
179
|
+
|
|
180
|
+
&:hover
|
|
181
|
+
transform: translateY(-2px)
|
|
182
|
+
box-shadow: 0 0.25rem 0.5rem rgba($black, 0.15)
|
|
183
|
+
|
|
184
|
+
// Responsive sidebar layout
|
|
185
|
+
@mixin responsive-sidebar($sidebar-width: 250px, $collapse-breakpoint: md, $gap: $spacer)
|
|
186
|
+
display: grid
|
|
187
|
+
gap: $gap
|
|
188
|
+
grid-template-columns: 1fr
|
|
189
|
+
grid-template-areas: "main"
|
|
190
|
+
|
|
191
|
+
.sidebar
|
|
192
|
+
grid-area: sidebar
|
|
193
|
+
width: 100%
|
|
194
|
+
|
|
195
|
+
// Mobile: full width, stacked
|
|
196
|
+
@include breakpoints.media-breakpoint-down($collapse-breakpoint)
|
|
197
|
+
order: -1
|
|
198
|
+
|
|
199
|
+
.main-content
|
|
200
|
+
grid-area: main
|
|
201
|
+
min-width: 0 // Prevent grid blowout
|
|
202
|
+
|
|
203
|
+
// Desktop: side-by-side layout
|
|
204
|
+
@include breakpoints.media-breakpoint-up($collapse-breakpoint)
|
|
205
|
+
grid-template-columns: $sidebar-width 1fr
|
|
206
|
+
grid-template-areas: "sidebar main"
|
|
207
|
+
|
|
208
|
+
.sidebar
|
|
209
|
+
position: sticky
|
|
210
|
+
top: 0
|
|
211
|
+
height: fit-content
|
|
212
|
+
|
|
213
|
+
// ===========================================
|
|
214
|
+
// UTILITY LAYOUT MIXINS
|
|
215
|
+
// ===========================================
|
|
216
|
+
|
|
217
|
+
// Aspect ratio container
|
|
218
|
+
@mixin aspect-ratio($ratio: math.div(16, 9))
|
|
219
|
+
position: relative
|
|
220
|
+
|
|
221
|
+
&::before
|
|
222
|
+
content: ""
|
|
223
|
+
display: block
|
|
224
|
+
padding-top: percentage(math.div(1, $ratio))
|
|
225
|
+
|
|
226
|
+
> *
|
|
227
|
+
position: absolute
|
|
228
|
+
top: 0
|
|
229
|
+
left: 0
|
|
230
|
+
width: 100%
|
|
231
|
+
height: 100%
|
|
232
|
+
object-fit: cover
|
|
233
|
+
|
|
234
|
+
// Responsive visibility utilities
|
|
235
|
+
@mixin responsive-visibility($show-on: (), $hide-on: ())
|
|
236
|
+
@each $breakpoint in $hide-on
|
|
237
|
+
@include breakpoints.media-breakpoint-only($breakpoint)
|
|
238
|
+
display: none !important
|
|
239
|
+
|
|
240
|
+
@each $breakpoint in $show-on
|
|
241
|
+
@include breakpoints.media-breakpoint-only($breakpoint)
|
|
242
|
+
display: block !important
|
|
243
|
+
|
|
244
|
+
// Safe area insets for mobile devices
|
|
245
|
+
@mixin safe-area-insets($property: padding, $directions: (top, right, bottom, left))
|
|
246
|
+
@each $direction in $directions
|
|
247
|
+
#{$property}-#{$direction}: env(safe-area-inset-#{$direction})
|
|
248
|
+
|
|
249
|
+
// Modern clamp-based responsive sizing
|
|
250
|
+
@mixin fluid-size($min-size, $max-size, $min-vw: 320px, $max-vw: 1200px)
|
|
251
|
+
font-size: clamp(#{$min-size}, #{$min-size} + (#{strip-unit($max-size)} - #{strip-unit($min-size)}) * math.div(100vw - #{$min-vw}, strip-unit($max-vw) - strip-unit($min-vw)), #{$max-size})
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Link Mixins - Reusable link state management
|
|
2
|
+
@use '../variables/colors' as *
|
|
3
|
+
|
|
4
|
+
// Base link mixin - removes default styling and adds transitions
|
|
5
|
+
@mixin link-base
|
|
6
|
+
text-decoration: none
|
|
7
|
+
cursor: pointer
|
|
8
|
+
transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out
|
|
9
|
+
outline: none
|
|
10
|
+
|
|
11
|
+
&:focus
|
|
12
|
+
outline: 2px solid $focus
|
|
13
|
+
outline-offset: 2px
|
|
14
|
+
|
|
15
|
+
// Link states mixin - parameterized state management
|
|
16
|
+
@mixin link-states($color, $hover-color, $active-color: $hover-color)
|
|
17
|
+
color: $color
|
|
18
|
+
|
|
19
|
+
&:hover
|
|
20
|
+
color: $hover-color
|
|
21
|
+
|
|
22
|
+
&:active
|
|
23
|
+
color: $active-color
|
|
24
|
+
|
|
25
|
+
&:visited
|
|
26
|
+
color: $color
|
|
27
|
+
|
|
28
|
+
// Link underline variants
|
|
29
|
+
@mixin link-underline($style: 'hover')
|
|
30
|
+
@if $style == 'always'
|
|
31
|
+
text-decoration: underline
|
|
32
|
+
@else if $style == 'hover'
|
|
33
|
+
text-decoration: none
|
|
34
|
+
&:hover
|
|
35
|
+
text-decoration: underline
|
|
36
|
+
@else if $style == 'none'
|
|
37
|
+
text-decoration: none
|
|
38
|
+
&:hover
|
|
39
|
+
text-decoration: none
|
|
40
|
+
|
|
41
|
+
// External link styling
|
|
42
|
+
@mixin link-external
|
|
43
|
+
&::after
|
|
44
|
+
content: '↗'
|
|
45
|
+
display: inline-block
|
|
46
|
+
margin-left: 0.25em
|
|
47
|
+
font-size: 0.875em
|
|
48
|
+
opacity: 0.7
|
|
49
|
+
|
|
50
|
+
// Link with icon support
|
|
51
|
+
@mixin link-with-icon($position: 'left', $gap: 0.5rem)
|
|
52
|
+
display: inline-flex
|
|
53
|
+
align-items: center
|
|
54
|
+
gap: $gap
|
|
55
|
+
|
|
56
|
+
.link-icon
|
|
57
|
+
@if $position == 'left'
|
|
58
|
+
order: -1
|
|
59
|
+
@else if $position == 'right'
|
|
60
|
+
order: 1
|
|
61
|
+
|
|
62
|
+
display: inline-flex
|
|
63
|
+
align-items: center
|
|
64
|
+
|
|
65
|
+
// Disabled link state
|
|
66
|
+
@mixin link-disabled
|
|
67
|
+
color: $text-quaternary
|
|
68
|
+
cursor: not-allowed
|
|
69
|
+
pointer-events: none
|
|
70
|
+
opacity: 0.6
|
|
71
|
+
|
|
72
|
+
// Button-like link styling
|
|
73
|
+
@mixin link-button($padding: 0.5rem 1rem)
|
|
74
|
+
display: inline-flex
|
|
75
|
+
align-items: center
|
|
76
|
+
justify-content: center
|
|
77
|
+
padding: $padding
|
|
78
|
+
border-radius: 4px
|
|
79
|
+
text-decoration: none
|
|
80
|
+
font-weight: 500
|
|
81
|
+
transition: all 0.2s ease-in-out
|
|
82
|
+
|
|
83
|
+
&:hover
|
|
84
|
+
transform: translateY(-1px)
|
|
85
|
+
text-decoration: none
|