@appartmint/mint 0.9.0 → 0.9.2

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.
@@ -7,42 +7,28 @@
7
7
  /// Imports
8
8
  @use '../util' as *;
9
9
 
10
- /// CSS variables
10
+ /// CSS Variables
11
11
  :root {
12
- @include css-var(delay-instant, delay(instant));
13
- @include css-var(delay-fast, delay(fast));
14
- @include css-var(delay-med-fast, delay(med-fast));
15
- @include css-var(delay-default, delay(default));
16
- @include css-var(delay-med-slow, delay(med-slow));
17
- @include css-var(delay-slow, delay(slow));
18
- }
19
-
20
- /// Styles
21
- #{class(sr-only)} {
22
- position: absolute !important;
23
- width: 1px !important;
24
- height: 1px !important;
25
- padding: 0 !important;
26
- margin: -1px !important;
27
- overflow: hidden !important;
28
- clip: rect(0, 0, 0, 0) !important;
29
- border: 0 !important;
12
+ @include css-var(header-height, $header-height);
13
+ @include css-var-ref(header-bg, $header-bg);
14
+ @include css-var-ref(header-fg, $header-fg);
30
15
  }
31
16
 
17
+ /// Header Styles
32
18
  #{id(header)} {
33
19
  display: flex;
34
20
  flex-direction: column;
35
21
  position: relative;
36
22
  width: 100%;
37
- color: css-var(fg);
23
+ color: css-var(header-fg);
38
24
  background-color: css-var(header-bg);
39
25
  z-index: 1000;
40
26
 
41
27
  &#{class(js)} {
42
28
  align-items: center;
43
29
  flex-direction: row;
44
- height: css-var(height);
45
- padding: calc((css-var(height) - css-var(btn-height)) / 2);
30
+ height: css-var(header-height);
31
+ padding: calc(css-var(header-height) / 2);
46
32
 
47
33
  #{controls(wrapper)} {
48
34
  display: inline-block;
@@ -80,7 +66,7 @@
80
66
 
81
67
  &.mint-right {
82
68
  #{id(wrapper)} {
83
- top: css-var(height);
69
+ top: css-var(header-height);
84
70
  right: -100%;
85
71
  left: unset;
86
72
 
@@ -103,7 +89,7 @@
103
89
 
104
90
  &.mint-left {
105
91
  #{id(wrapper)} {
106
- top: css-var(height);
92
+ top: css-var(header-height);
107
93
  left: -100%;
108
94
 
109
95
  &#{class(open)} {
@@ -118,7 +104,7 @@
118
104
  top: 0;
119
105
  left: 0;
120
106
  width: 100%;
121
- height: css-var(height);
107
+ height: css-var(header-height);
122
108
  background: css-var(header-bg);
123
109
  z-index: -1;
124
110
  }
@@ -140,17 +126,30 @@
140
126
  a, button {
141
127
  display: flex;
142
128
  align-items: center;
143
- padding: calc((css-var(height) - css-var(btn-height)) / 2);
129
+ width: 100%;
130
+ margin: 0;
131
+ border: 0;
132
+ color: css-var(header-fg);
133
+ background: css-var(trans);
144
134
  }
145
135
 
136
+ h1 {
137
+ display: flex;
138
+ white-space: nowrap;
139
+ margin: 0;
140
+ }
141
+
142
+ #{class(logo)} {
143
+ text-decoration: none;
144
+
145
+ img {
146
+ max-width: css-var(header-height);
147
+ }
148
+ }
149
+
146
150
  #{controls(wrapper)} {
147
151
  display: none;
148
152
  }
149
-
150
- #{id(logo)} {
151
- margin: calc((css-var(height) - css-var(btn-height)) / 2);
152
- padding: 0;
153
- }
154
153
 
155
154
  #{id(wrapper)} {
156
155
  display: flex;
@@ -159,12 +158,12 @@
159
158
  top: -100%;
160
159
  left: 0;
161
160
  width: 100%;
162
- height: calc(100vh - css-var(height));
161
+ height: calc(100vh - css-var(header-height));
163
162
  transition: none;
164
163
  z-index: -2;
165
164
 
166
165
  &#{class(open)} {
167
- top: css-var(height);
166
+ top: css-var(header-height);
168
167
  }
169
168
  }
170
169
 
@@ -172,7 +171,7 @@
172
171
  position: absolute;
173
172
  top: 0;
174
173
  right: 0;
175
- height: css-var(height);
174
+ height: css-var(header-height);
176
175
  }
177
176
 
178
177
  #{class(dropdown)} {
@@ -182,13 +181,13 @@
182
181
  display: flex;
183
182
  align-items: center;
184
183
  justify-content: center;
185
- min-width: css-var(height);
186
- height: css-var(height);
187
- padding: calc((css-var(height) - css-var(btn-height)) / 2);
184
+ min-width: css-var(header-height);
185
+ height: css-var(header-height);
186
+ padding: calc(css-var(header-height) / 2);
188
187
  }
189
188
 
190
189
  li {
191
- padding: calc((css-var(height) - css-var(btn-height)) / 2);
190
+ padding: calc(css-var(header-height) / 2);
192
191
  line-height: 1;
193
192
  cursor: pointer;
194
193
  }
@@ -0,0 +1,33 @@
1
+ /// _image.scss - Image styles
2
+ /// @author App/Art Mint
3
+ ///
4
+ /// @group Components
5
+ @charset 'utf-8';
6
+
7
+ /// Imports
8
+ @use '../util' as *;
9
+
10
+ /// Variables
11
+ $shadow-color: rgba(0, 0, 0, 0.4);
12
+ $shadow-size: 0.5rem;
13
+
14
+ /// Image styles
15
+ #{class(image)} {
16
+ &#{class(error)} {
17
+ &::after {
18
+ content: '❌ Image failed to load. This is a placeholder.';
19
+ position: absolute;
20
+ bottom: 0;
21
+ left: 0;
22
+ width: 100%;
23
+ padding: 0 $shadow-size $shadow-size $shadow-size;
24
+ background: $shadow-color;
25
+ box-shadow: 0 0 $shadow-size $shadow-size $shadow-color;
26
+ text-align: center;
27
+ }
28
+ }
29
+
30
+ img {
31
+ display: block;
32
+ }
33
+ }
@@ -2,3 +2,4 @@
2
2
  @use './buttons';
3
3
  @use './cards';
4
4
  @use './header';
5
+ @use './image';
@@ -6,8 +6,43 @@
6
6
 
7
7
  /// Imports
8
8
  @use 'sass:math';
9
+ @use 'sass:map';
10
+ @use 'sass:list';
9
11
  @use '../util' as *;
10
12
 
13
+ /// Variables
14
+ $animations: (());
15
+ $transitions: (());
16
+
17
+ /// Mixins
18
+ /// Register an animation
19
+ @mixin animation($animation) {
20
+ $animations: map-merge($animations, (&: map-merge(map.get($animations, &), $animation)));
21
+ $this: map.get($animations, &);
22
+ $animation: '';
23
+
24
+ & {
25
+ @each $item in $this {
26
+ @if (list.index($this, $item) != 1) {
27
+ $animation: #{$animation},;
28
+ }
29
+ $animation: #{$animation}#{$item};
30
+ }
31
+ animation: $animation;
32
+
33
+ @each $name, $items in $animations {
34
+ &#{class($name)} {
35
+ animation: $animation;
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ /// Register a transition
42
+ @mixin transition($transition) {
43
+ $transitions: map-merge($transitions, ($name: $transition));
44
+ }
45
+
11
46
  /// Animations
12
47
  /// Cycle through instagram colors
13
48
  @keyframes instafade {
@@ -32,7 +67,7 @@
32
67
  #{class(fall-in)} {
33
68
  opacity: 0;
34
69
  transform: translateY(-100px);
35
- transition: all delay(slow), box-shadow delay(slow) delay(med-slow) !important;
70
+ transition: all delay(slow) ease-out, box-shadow delay(slow) delay(med-slow) ease-out !important;
36
71
  pointer-events: none;
37
72
 
38
73
  &#{class(show)}#{neg(class(loading))} {
@@ -70,6 +105,6 @@
70
105
  height: 100%;
71
106
  transform: translate(-100%, 100%);
72
107
  background: linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
73
- transition: transform delay(med-fast) ease-in;
108
+ transition: transform delay(med-fast) ease-out;
74
109
  }
75
110
  }
@@ -51,7 +51,7 @@ a {
51
51
  white-space: nowrap;
52
52
  }
53
53
 
54
- i {
54
+ i:last-child {
55
55
  margin-left: 0.25rem;
56
56
  }
57
57
  }
@@ -75,3 +75,14 @@ img {
75
75
  #{class(noglow)} {
76
76
  box-shadow: none !important;
77
77
  }
78
+
79
+ #{class(sr-only)} {
80
+ position: absolute !important;
81
+ width: 1px !important;
82
+ height: 1px !important;
83
+ padding: 0 !important;
84
+ margin: -1px !important;
85
+ overflow: hidden !important;
86
+ clip: rect(0, 0, 0, 0) !important;
87
+ border: 0 !important;
88
+ }
@@ -7,31 +7,6 @@
7
7
  /// Imports
8
8
  @use '../util' as *;
9
9
 
10
- /// Fonts
11
- $font-primary: 'Palanquin' !default;
12
- $font-secondary: 'JosefinSans' !default;
13
- $font-backups: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
14
-
15
- /// Font Sizes
16
- $font-size-mobile: (
17
- h1: 2.5rem,
18
- h2: 2rem,
19
- h3: 1.75rem,
20
- h4: 1.5rem,
21
- h5: 1.25rem,
22
- h6: 1.125rem,
23
- p: 1rem,
24
- ) !default;
25
- $font-size-desktop: (
26
- h1: 3rem,
27
- h2: 2.5rem,
28
- h3: 2rem,
29
- h4: 1.75rem,
30
- h5: 1.5rem,
31
- h6: 1.25rem,
32
- p: 1.125rem,
33
- ) !default;
34
-
35
10
  /// Text Styles
36
11
  html, body {
37
12
  font-family: $font-primary, $font-backups;
@@ -42,10 +17,13 @@ html, body {
42
17
  }
43
18
  }
44
19
 
45
- @for $i from 1 through 6 {
46
- h#{$i}, #{class(h#{$i})} {
47
- font-family: $font-secondary, $font-backups;
48
- }
20
+ p {
21
+ line-height: 1.75;
22
+ }
23
+
24
+ @include headers () {
25
+ font-family: $font-secondary, $font-secondary-backups;
26
+ line-height: 1;
49
27
  }
50
28
 
51
29
  @each $tag in map-keys($font-size-mobile) {
@@ -108,8 +108,4 @@ a {
108
108
  color: css-var(venmo);
109
109
  }
110
110
  }
111
-
112
- i {
113
- transition: color delay(slow);
114
- }
115
111
  }
@@ -711,3 +711,48 @@ $bootstrap5: false !default;
711
711
  }
712
712
  }
713
713
  }
714
+
715
+ /// Generates flex utility classes
716
+ /// @group Mixins
717
+ ///
718
+ ///
719
+ @mixin flex-util () {
720
+ & {
721
+ display: flex;
722
+ align-items: center;
723
+ justify-content: flex-start;
724
+ flex-wrap: wrap;
725
+
726
+ &#{class(center)} {
727
+ justify-content: center;
728
+ }
729
+
730
+ &#{class(end)} {
731
+ justify-content: flex-end;
732
+ }
733
+
734
+ &#{class(between)} {
735
+ justify-content: space-between;
736
+ }
737
+
738
+ &#{class(around)} {
739
+ justify-content: space-around;
740
+ }
741
+
742
+ &#{class(even)} {
743
+ justify-content: space-evenly;
744
+ }
745
+ }
746
+ }
747
+
748
+ /// Selector for all headers
749
+ /// @group Mixins
750
+ ///
751
+ ///
752
+ @mixin headers () {
753
+ @for $i from 1 through 6 {
754
+ h#{$i}, #{class(h#{$i})} {
755
+ @content;
756
+ }
757
+ }
758
+ }
@@ -34,7 +34,7 @@ $grey: #888 !default;
34
34
  $trans-light: rgba(255, 255, 255, 0) !default;
35
35
  $trans-dark: rgba(0, 0, 0, 0) !default;
36
36
 
37
- $brand: #4682b4 !default;
37
+ $brand: #bada55 !default;
38
38
  $accent: #483d8b !default;
39
39
  $success: #208a20 !default;
40
40
  $danger: #ff4d4d !default;
@@ -44,8 +44,37 @@ $info: $brand !default;
44
44
  $fore: lighten($black, 10%) !default;
45
45
  $back: darken($white, 10%) !default;
46
46
 
47
+ $header-bg: brand-4 !default;
48
+ $header-fg: back !default;
49
+
50
+ /// Fonts
51
+ $font-primary: sans-serif !default;
52
+ $font-secondary: serif !default;
53
+ $font-backups: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
54
+ $font-secondary-backups: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
55
+
56
+ /// Font Sizes
57
+ $font-size-mobile: (
58
+ h1: 2.5rem,
59
+ h2: 2rem,
60
+ h3: 1.75rem,
61
+ h4: 1.5rem,
62
+ h5: 1.25rem,
63
+ h6: 1.125rem,
64
+ p: 1rem,
65
+ ) !default;
66
+ $font-size-desktop: (
67
+ h1: 3rem,
68
+ h2: 2.5rem,
69
+ h3: 2rem,
70
+ h4: 1.75rem,
71
+ h5: 1.5rem,
72
+ h6: 1.25rem,
73
+ p: 1.125rem,
74
+ ) !default;
75
+
47
76
  /// Structure
48
- $nav-height: 4rem !default;
77
+ $header-height: 4rem !default;
49
78
 
50
79
  /// Default theme
51
80
  $theme-default: light !default;