@nuvoui/core 1.2.0 → 1.2.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.
@@ -51,6 +51,14 @@
51
51
 
52
52
  // Grid Alignment Mixins
53
53
 
54
+ // Alignment Classes
55
+ $alignments: (
56
+ 'start': start,
57
+ 'end': end,
58
+ 'center': center,
59
+ 'stretch': stretch
60
+ );
61
+
54
62
  /**
55
63
  * @description justify-items container.
56
64
  * @param {string} $value - The value for the justify-items property.
@@ -70,8 +78,8 @@
70
78
  @mixin place-items($value) {place-items: $value;}
71
79
 
72
80
  // Grid Item Placement Mixins
73
- @mixin span-col($span) {grid-column: span $span / span $span;}
74
- @mixin span-row($span) {grid-row: span $span / span $span;}
81
+ @mixin col-span($span) {grid-column: span $span / span $span;}
82
+ @mixin row-span($span) {grid-row: span $span / span $span;}
75
83
  @mixin col-start($start) {grid-column-start: $start;}
76
84
  @mixin col-end($end) {grid-column-end: $end;}
77
85
  @mixin row-start($start) {grid-row-start: $start;}
@@ -88,87 +96,81 @@
88
96
  grid-row: $row;
89
97
  }
90
98
 
91
- // Classes
92
- .grid { @include grid; }
93
- .grid.inline { @include grid-inline; }
99
+ @if VAR.$generate-utility-classes {
100
+ // Classes
101
+ .grid { @include grid; }
102
+ .grid.inline { @include grid-inline; }
94
103
 
95
104
 
96
- @for $i from 1 through VAR.$column-count {
97
- .grid.cols-#{$i} { @include cols($i); }
98
- .grid.rows-#{$i} { @include rows($i); }
99
- }
105
+ @for $i from 1 through VAR.$column-count {
106
+ .grid.cols-#{$i} { @include cols($i); }
107
+ .grid.rows-#{$i} { @include rows($i); }
108
+ }
100
109
 
101
- // Grid Template Classes
102
- @each $breakpoint, $width in VAR.$breakpoints {
103
- // Responsive grid columns
104
- @media (min-width: #{$width}) {
105
- @for $i from 1 through VAR.$column-count {
106
- .grid.cols-#{$i}\@#{$breakpoint} { @include cols($i); }
107
- .grid.rows-#{$i}\@#{$breakpoint} { @include rows($i); }
110
+ // Grid Template Classes
111
+ @each $breakpoint, $width in VAR.$breakpoints {
112
+ // Responsive grid columns
113
+ @media (min-width: #{$width}) {
114
+ @for $i from 1 through VAR.$column-count {
115
+ .grid.cols-#{$i}\@#{$breakpoint} { @include cols($i); }
116
+ .grid.rows-#{$i}\@#{$breakpoint} { @include rows($i); }
117
+ }
108
118
  }
109
119
  }
110
- }
111
120
 
112
121
 
113
- // Generate Column Span Classes with Responsive Variants
114
- @for $i from 1 through VAR.$column-count {
115
- .span-col-#{$i} {
116
- @include span-col($i);
117
- }
122
+ // Generate Column Span Classes with Responsive Variants
123
+ @for $i from 1 through VAR.$column-count {
124
+ .col-span-#{$i} {
125
+ @include col-span($i);
126
+ }
118
127
 
119
- .span-row-#{$i} {
120
- @include span-row($i);
121
- }
128
+ .row-span-#{$i} {
129
+ @include row-span($i);
130
+ }
122
131
 
123
- @each $breakpoint, $width in VAR.$breakpoints {
124
- @media (min-width: #{$width}) {
125
- .span-col-#{$i}\@#{$breakpoint} {
126
- @include span-col($i);
127
- }
132
+ @each $breakpoint, $width in VAR.$breakpoints {
133
+ @media (min-width: #{$width}) {
134
+ .col-span-#{$i}\@#{$breakpoint} {
135
+ @include col-span($i);
136
+ }
128
137
 
129
- .span-row-#{$i}\@#{$breakpoint} {
130
- @include span-row($i);
138
+ .row-span-#{$i}\@#{$breakpoint} {
139
+ @include row-span($i);
140
+ }
131
141
  }
132
142
  }
133
143
  }
134
- }
135
-
136
-
137
- // Auto-fit/fill Classes
138
- @each $size, $width in VAR.$grid-item-sizes {
139
- .grid.auto-fit-#{$size} { @include auto-fit($width); }
140
- .grid.auto-fill-#{$size} { @include auto-fill($width); }
141
- }
142
144
 
143
- // Flow Classes
144
- .grid.flow-row { @include flow-in-row; }
145
- .grid.flow-col { @include flow-in-col; }
146
- .grid.flow-dense { @include flow-dense-items; }
147
145
 
148
- // Alignment Classes
149
- $alignments: (
150
- 'start': start,
151
- 'end': end,
152
- 'center': center,
153
- 'stretch': stretch
154
- );
155
-
156
- @each $name, $value in $alignments {
157
- .justify-items-#{$name} { justify-items: $value; }
158
- .align-items-#{$name} { align-items: $value; }
159
- .place-items-#{$name} { place-items: $value; }
146
+ // Auto-fit/fill Classes
147
+ @each $size, $width in VAR.$grid-item-sizes {
148
+ .grid.auto-fit-#{$size} { @include auto-fit($width); }
149
+ .grid.auto-fill-#{$size} { @include auto-fill($width); }
150
+ }
160
151
 
161
- @each $breakpoint, $width in VAR.$breakpoints {
162
- @media (min-width: #{$width}) {
163
- .justify-items-#{$name}\@#{$breakpoint} {
164
- justify-items: $value;
165
- }
166
- .align-items-#{$name}\@#{$breakpoint} {
167
- align-items: $value;
168
- }
169
- .place-items-#{$name}\@#{$breakpoint} {
170
- place-items: $value;
152
+ // Flow Classes
153
+ .grid.flow-row { @include flow-in-row; }
154
+ .grid.flow-col { @include flow-in-col; }
155
+ .grid.flow-dense { @include flow-dense-items; }
156
+
157
+ @each $name, $value in $alignments {
158
+ .justify-items-#{$name} { justify-items: $value; }
159
+ .align-items-#{$name} { align-items: $value; }
160
+ .place-items-#{$name} { place-items: $value; }
161
+
162
+ @each $breakpoint, $width in VAR.$breakpoints {
163
+ @media (min-width: #{$width}) {
164
+ .justify-items-#{$name}\@#{$breakpoint} {
165
+ justify-items: $value;
166
+ }
167
+ .align-items-#{$name}\@#{$breakpoint} {
168
+ align-items: $value;
169
+ }
170
+ .place-items-#{$name}\@#{$breakpoint} {
171
+ place-items: $value;
172
+ }
171
173
  }
172
174
  }
173
175
  }
174
- }
176
+ }