@andreyshpigunov/x 0.4.4 → 0.5.1

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.
@@ -29,168 +29,172 @@ All right reserved.
29
29
  .flex > .c[1-12]/[1-12] (s,m,l,xl) - column width "column/columns"
30
30
  */
31
31
 
32
- .flex { display: flex }
33
-
34
- [class*=flex] {
35
- /* Columns */
36
- @for $cols from 1 to 12 {
37
- @for $col from 1 to $cols {
38
- & > .c$(col)\/$(cols) {
39
- flex-basis: calc($(col) / $(cols) * 100%);
40
- max-width: calc($(col) / $(cols) * 100%);
41
- }
42
- }
43
- }
32
+ @layer flex {
33
+
34
+ .flex { display: flex }
44
35
 
45
- @media (min-width: 640px) {
36
+ [class*=flex] {
37
+ /* Columns */
46
38
  @for $cols from 1 to 12 {
47
39
  @for $col from 1 to $cols {
48
- & > .s\:c$(col)\/$(cols) {
40
+ & > .c$(col)\/$(cols) {
49
41
  flex-basis: calc($(col) / $(cols) * 100%);
50
42
  max-width: calc($(col) / $(cols) * 100%);
51
43
  }
52
44
  }
53
45
  }
54
- }
55
-
56
- @media (min-width: 768px) {
57
- @for $cols from 1 to 12 {
58
- @for $col from 1 to $cols {
59
- & > .m\:c$(col)\/$(cols) {
60
- flex-basis: calc($(col) / $(cols) * 100%);
61
- max-width: calc($(col) / $(cols) * 100%);
46
+
47
+ @media (min-width: 640px) {
48
+ @for $cols from 1 to 12 {
49
+ @for $col from 1 to $cols {
50
+ & > .s\:c$(col)\/$(cols) {
51
+ flex-basis: calc($(col) / $(cols) * 100%);
52
+ max-width: calc($(col) / $(cols) * 100%);
53
+ }
62
54
  }
63
55
  }
64
56
  }
65
- }
66
-
67
- @media (min-width: 1024px) {
68
- @for $cols from 1 to 12 {
69
- @for $col from 1 to $cols {
70
- & > .l\:c$(col)\/$(cols) {
71
- flex-basis: calc($(col) / $(cols) * 100%);
72
- max-width: calc($(col) / $(cols) * 100%);
57
+
58
+ @media (min-width: 768px) {
59
+ @for $cols from 1 to 12 {
60
+ @for $col from 1 to $cols {
61
+ & > .m\:c$(col)\/$(cols) {
62
+ flex-basis: calc($(col) / $(cols) * 100%);
63
+ max-width: calc($(col) / $(cols) * 100%);
64
+ }
73
65
  }
74
66
  }
75
67
  }
76
- }
77
-
78
- @media (min-width: 1280px) {
79
- @for $cols from 1 to 12 {
80
- @for $col from 1 to $cols {
81
- & > .xl\:c$(col)\/$(cols) {
82
- flex-basis: calc($(col) / $(cols) * 100%);
83
- max-width: calc($(col) / $(cols) * 100%);
68
+
69
+ @media (min-width: 1024px) {
70
+ @for $cols from 1 to 12 {
71
+ @for $col from 1 to $cols {
72
+ & > .l\:c$(col)\/$(cols) {
73
+ flex-basis: calc($(col) / $(cols) * 100%);
74
+ max-width: calc($(col) / $(cols) * 100%);
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ @media (min-width: 1280px) {
81
+ @for $cols from 1 to 12 {
82
+ @for $col from 1 to $cols {
83
+ & > .xl\:c$(col)\/$(cols) {
84
+ flex-basis: calc($(col) / $(cols) * 100%);
85
+ max-width: calc($(col) / $(cols) * 100%);
86
+ }
84
87
  }
85
88
  }
86
89
  }
87
90
  }
88
- }
89
-
90
- .fr { flex-direction: row }
91
- .fc { flex-direction: column }
92
- .fw { flex-wrap: wrap }
93
- .fnw { flex-wrap: nowrap }
94
-
95
- .ais { align-items: stretch }
96
- .aifs { align-items: flex-start }
97
- .aic { align-items: center }
98
- .aife { align-items: flex-end }
99
-
100
- .jcfs { justify-content: flex-start }
101
- .jcc { justify-content: center }
102
- .jcfe { justify-content: flex-end }
103
- .jcsb { justify-content: space-between }
104
- .jcsa { justify-content: space-around }
105
- .jcse { justify-content: space-evenly }
106
-
107
- .no-shrink { flex-shrink: 0 }
108
- .no-grow { flex-grow: 0 }
109
-
110
- @media (min-width: 640px) {
111
- .s\:fr { flex-direction: row }
112
- .s\:fc { flex-direction: column }
113
- .s\:fw { flex-wrap: wrap }
114
- .s\:fnw { flex-wrap: nowrap }
115
-
116
- .s\:ais { align-items: stretch }
117
- .s\:aifs { align-items: flex-start }
118
- .s\:aic { align-items: center }
119
- .s\:aife { align-items: flex-end }
120
91
 
121
- .s\:jcfs { justify-content: flex-start }
122
- .s\:jcc { justify-content: center }
123
- .s\:jcfe { justify-content: flex-end }
124
- .s\:jcsb { justify-content: space-between }
125
- .s\:jcsa { justify-content: space-around }
126
- .s\:jcse { justify-content: space-evenly }
92
+ .fr { flex-direction: row }
93
+ .fc { flex-direction: column }
94
+ .fw { flex-wrap: wrap }
95
+ .fnw { flex-wrap: nowrap }
127
96
 
128
- .s\:no-shrink { flex-shrink: 0 }
129
- .s\:no-grow { flex-grow: 0 }
130
- }
131
-
132
- @media (min-width: 768px) {
133
- .m\:fr { flex-direction: row }
134
- .m\:fc { flex-direction: column }
135
- .m\:fw { flex-wrap: wrap }
136
- .m\:fnw { flex-wrap: nowrap }
97
+ .ais { align-items: stretch }
98
+ .aifs { align-items: flex-start }
99
+ .aic { align-items: center }
100
+ .aife { align-items: flex-end }
137
101
 
138
- .m\:ais { align-items: stretch }
139
- .m\:aifs { align-items: flex-start }
140
- .m\:aic { align-items: center }
141
- .m\:aife { align-items: flex-end }
102
+ .jcfs { justify-content: flex-start }
103
+ .jcc { justify-content: center }
104
+ .jcfe { justify-content: flex-end }
105
+ .jcsb { justify-content: space-between }
106
+ .jcsa { justify-content: space-around }
107
+ .jcse { justify-content: space-evenly }
142
108
 
143
- .m\:jcfs { justify-content: flex-start }
144
- .m\:jcc { justify-content: center }
145
- .m\:jcfe { justify-content: flex-end }
146
- .m\:jcsb { justify-content: space-between }
147
- .m\:jcsa { justify-content: space-around }
148
- .m\:jcse { justify-content: space-evenly }
109
+ .no-shrink { flex-shrink: 0 }
110
+ .no-grow { flex-grow: 0 }
149
111
 
150
- .m\:no-shrink { flex-shrink: 0 }
151
- .m\:no-grow { flex-grow: 0 }
152
- }
153
-
154
- @media (min-width: 1024px) {
155
- .l\:fr { flex-direction: row }
156
- .l\:fc { flex-direction: column }
157
- .l\:fw { flex-wrap: wrap }
158
- .l\:fnw { flex-wrap: nowrap }
112
+ @media (min-width: 640px) {
113
+ .s\:fr { flex-direction: row }
114
+ .s\:fc { flex-direction: column }
115
+ .s\:fw { flex-wrap: wrap }
116
+ .s\:fnw { flex-wrap: nowrap }
117
+
118
+ .s\:ais { align-items: stretch }
119
+ .s\:aifs { align-items: flex-start }
120
+ .s\:aic { align-items: center }
121
+ .s\:aife { align-items: flex-end }
122
+
123
+ .s\:jcfs { justify-content: flex-start }
124
+ .s\:jcc { justify-content: center }
125
+ .s\:jcfe { justify-content: flex-end }
126
+ .s\:jcsb { justify-content: space-between }
127
+ .s\:jcsa { justify-content: space-around }
128
+ .s\:jcse { justify-content: space-evenly }
129
+
130
+ .s\:no-shrink { flex-shrink: 0 }
131
+ .s\:no-grow { flex-grow: 0 }
132
+ }
159
133
 
160
- .l\:ais { align-items: stretch }
161
- .l\:aifs { align-items: flex-start }
162
- .l\:aic { align-items: center }
163
- .l\:aife { align-items: flex-end }
134
+ @media (min-width: 768px) {
135
+ .m\:fr { flex-direction: row }
136
+ .m\:fc { flex-direction: column }
137
+ .m\:fw { flex-wrap: wrap }
138
+ .m\:fnw { flex-wrap: nowrap }
139
+
140
+ .m\:ais { align-items: stretch }
141
+ .m\:aifs { align-items: flex-start }
142
+ .m\:aic { align-items: center }
143
+ .m\:aife { align-items: flex-end }
144
+
145
+ .m\:jcfs { justify-content: flex-start }
146
+ .m\:jcc { justify-content: center }
147
+ .m\:jcfe { justify-content: flex-end }
148
+ .m\:jcsb { justify-content: space-between }
149
+ .m\:jcsa { justify-content: space-around }
150
+ .m\:jcse { justify-content: space-evenly }
151
+
152
+ .m\:no-shrink { flex-shrink: 0 }
153
+ .m\:no-grow { flex-grow: 0 }
154
+ }
164
155
 
165
- .l\:jcfs { justify-content: flex-start }
166
- .l\:jcc { justify-content: center }
167
- .l\:jcfe { justify-content: flex-end }
168
- .l\:jcsb { justify-content: space-between }
169
- .l\:jcsa { justify-content: space-around }
170
- .l\:jcse { justify-content: space-evenly }
156
+ @media (min-width: 1024px) {
157
+ .l\:fr { flex-direction: row }
158
+ .l\:fc { flex-direction: column }
159
+ .l\:fw { flex-wrap: wrap }
160
+ .l\:fnw { flex-wrap: nowrap }
161
+
162
+ .l\:ais { align-items: stretch }
163
+ .l\:aifs { align-items: flex-start }
164
+ .l\:aic { align-items: center }
165
+ .l\:aife { align-items: flex-end }
166
+
167
+ .l\:jcfs { justify-content: flex-start }
168
+ .l\:jcc { justify-content: center }
169
+ .l\:jcfe { justify-content: flex-end }
170
+ .l\:jcsb { justify-content: space-between }
171
+ .l\:jcsa { justify-content: space-around }
172
+ .l\:jcse { justify-content: space-evenly }
173
+
174
+ .l\:no-shrink { flex-shrink: 0 }
175
+ .l\:no-grow { flex-grow: 0 }
176
+ }
171
177
 
172
- .l\:no-shrink { flex-shrink: 0 }
173
- .l\:no-grow { flex-grow: 0 }
174
- }
178
+ @media (min-width: 1280px) {
179
+ .xl\:fr { flex-direction: row }
180
+ .xl\:fc { flex-direction: column }
181
+ .xl\:fw { flex-wrap: wrap }
182
+ .xl\:fnw { flex-wrap: nowrap }
183
+
184
+ .xl\:ais { align-items: stretch }
185
+ .xl\:aifs { align-items: flex-start }
186
+ .xl\:aic { align-items: center }
187
+ .xl\:aife { align-items: flex-end }
188
+
189
+ .xl\:jcfs { justify-content: flex-start }
190
+ .xl\:jcc { justify-content: center }
191
+ .xl\:jcfe { justify-content: flex-end }
192
+ .xl\:jcsb { justify-content: space-between }
193
+ .xl\:jcsa { justify-content: space-around }
194
+ .xl\:jcse { justify-content: space-evenly }
195
+
196
+ .xl\:no-shrink { flex-shrink: 0 }
197
+ .xl\:no-grow { flex-grow: 0 }
198
+ }
175
199
 
176
- @media (min-width: 1280px) {
177
- .xl\:fr { flex-direction: row }
178
- .xl\:fc { flex-direction: column }
179
- .xl\:fw { flex-wrap: wrap }
180
- .xl\:fnw { flex-wrap: nowrap }
181
-
182
- .xl\:ais { align-items: stretch }
183
- .xl\:aifs { align-items: flex-start }
184
- .xl\:aic { align-items: center }
185
- .xl\:aife { align-items: flex-end }
186
-
187
- .xl\:jcfs { justify-content: flex-start }
188
- .xl\:jcc { justify-content: center }
189
- .xl\:jcfe { justify-content: flex-end }
190
- .xl\:jcsb { justify-content: space-between }
191
- .xl\:jcsa { justify-content: space-around }
192
- .xl\:jcse { justify-content: space-evenly }
193
-
194
- .xl\:no-shrink { flex-shrink: 0 }
195
- .xl\:no-grow { flex-grow: 0 }
196
200
  }
@@ -11,47 +11,51 @@ All right reserved.
11
11
  .flow.s[0-10] (s,m,l,xl) - vertical space
12
12
  */
13
13
 
14
- .flow {
14
+ @layer flow {
15
15
 
16
- & > * { margin: 0 }
17
-
18
- @for $i from 0 to 10 {
19
- &.s$(i) > * {
20
- margin-bottom: var(--space-$(i));
21
- }
22
- }
23
-
24
- @media (min-width: 640px) {
16
+ .flow {
17
+
18
+ & > * { margin: 0 }
19
+
25
20
  @for $i from 0 to 10 {
26
- &.s\:s$(i) > * {
21
+ &.s$(i) > * {
27
22
  margin-bottom: var(--space-$(i));
28
23
  }
29
24
  }
30
- }
31
-
32
- @media (min-width: 768px) {
33
- @for $i from 0 to 10 {
34
- &.m\:s$(i) > * {
35
- margin-bottom: var(--space-$(i));
25
+
26
+ @media (min-width: 640px) {
27
+ @for $i from 0 to 10 {
28
+ &.s\:s$(i) > * {
29
+ margin-bottom: var(--space-$(i));
30
+ }
36
31
  }
37
32
  }
38
- }
39
-
40
- @media (min-width: 1024px) {
41
- @for $i from 0 to 10 {
42
- &.l\:s$(i) > * {
43
- margin-bottom: var(--space-$(i));
33
+
34
+ @media (min-width: 768px) {
35
+ @for $i from 0 to 10 {
36
+ &.m\:s$(i) > * {
37
+ margin-bottom: var(--space-$(i));
38
+ }
44
39
  }
45
40
  }
46
- }
47
-
48
- @media (min-width: 1280px) {
49
- @for $i from 0 to 10 {
50
- &.xl\:s$(i) > * {
51
- margin-bottom: var(--space-$(i));
41
+
42
+ @media (min-width: 1024px) {
43
+ @for $i from 0 to 10 {
44
+ &.l\:s$(i) > * {
45
+ margin-bottom: var(--space-$(i));
46
+ }
47
+ }
48
+ }
49
+
50
+ @media (min-width: 1280px) {
51
+ @for $i from 0 to 10 {
52
+ &.xl\:s$(i) > * {
53
+ margin-bottom: var(--space-$(i));
54
+ }
52
55
  }
53
56
  }
57
+
58
+ & > *:last-child { margin-bottom: 0 }
54
59
  }
55
-
56
- & > *:last-child { margin-bottom: 0 }
60
+
57
61
  }
@@ -36,103 +36,107 @@ All right reserved.
36
36
  */
37
37
  }
38
38
 
39
- input[type="color"],
40
- input[type="date"],
41
- input[type="datetime"],
42
- input[type="tel"],
43
- input[type="email"],
44
- input[type="month"],
45
- input[type="number"],
46
- input[type="password"],
47
- input[type="search"],
48
- input[type="text"],
49
- input[type="time"],
50
- input[type="url"],
51
- input[type="week"],
52
- input:not([type]),
53
- textarea,
54
- select {
55
- position: relative;
56
- width: 100%;
57
- height: var(--form-height);
58
- height: var(--form-height, calc(var(--form-font-size) * var(--form-height-coeff)));
59
- margin: 0;
60
- padding: 0 var(--form-side-padding);
61
- font-size: var(--form-font-size);
62
- color: var(--form-font-color);
63
- outline: none;
64
- border-width: var(--form-border-width);
65
- border-style: solid;
66
- border-color: var(--form-border-color);
67
- border-radius: var(--form-border-radius);
68
- background-color: var(--form-background-color);
69
- appearance: none;
70
-
71
- &[readonly],
72
- &[readonly]:focus {
73
- color: var(--form-font-color-readonly);
74
- border-color: var(--form-border-color-readonly);
75
- background-color: var(--form-background-color-readonly);
76
- box-shadow: none;
39
+ @layer form {
40
+
41
+ input[type="color"],
42
+ input[type="date"],
43
+ input[type="datetime"],
44
+ input[type="tel"],
45
+ input[type="email"],
46
+ input[type="month"],
47
+ input[type="number"],
48
+ input[type="password"],
49
+ input[type="search"],
50
+ input[type="text"],
51
+ input[type="time"],
52
+ input[type="url"],
53
+ input[type="week"],
54
+ input:not([type]),
55
+ textarea,
56
+ select {
57
+ position: relative;
58
+ width: 100%;
59
+ height: var(--form-height);
60
+ height: var(--form-height, calc(var(--form-font-size) * var(--form-height-coeff)));
61
+ margin: 0;
62
+ padding: 0 var(--form-side-padding);
63
+ font-size: var(--form-font-size);
64
+ color: var(--form-font-color);
65
+ outline: none;
66
+ border-width: var(--form-border-width);
67
+ border-style: solid;
68
+ border-color: var(--form-border-color);
69
+ border-radius: var(--form-border-radius);
70
+ background-color: var(--form-background-color);
71
+ appearance: none;
72
+
73
+ &[readonly],
74
+ &[readonly]:focus {
75
+ color: var(--form-font-color-readonly);
76
+ border-color: var(--form-border-color-readonly);
77
+ background-color: var(--form-background-color-readonly);
78
+ box-shadow: none;
79
+ }
80
+ &[disabled],
81
+ &[disabled]:focus {
82
+ color: var(--form-font-color-disabled);
83
+ border-color: var(--form-border-color-disabled);
84
+ background-color: var(--form-background-color-disabled);
85
+ cursor: not-allowed;
86
+ box-shadow: none;
87
+ }
88
+
89
+ &:focus {
90
+ border-color: var(--form-border-color-focused);
91
+ box-shadow: 0 0 0 1px var(--form-border-color-focused);
92
+ }
93
+ &.error,
94
+ &.error:focus,
95
+ &[pattern]:invalid,
96
+ &[pattern]:invalid:focus {
97
+ border-color: var(--form-border-color-error);
98
+ box-shadow: 0 0 0 1px var(--form-border-color-error);
99
+ }
100
+ }
101
+
102
+ select {
103
+ padding-right: calc(var(--form-side-padding) * 2.6);
104
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
105
+ background-position: right calc(var(--form-side-padding) - 4px) top 52%, 0 0;
106
+ background-repeat: no-repeat;
107
+ background-size: 1.6rem;
77
108
  }
78
- &[disabled],
79
- &[disabled]:focus {
80
- color: var(--form-font-color-disabled);
81
- border-color: var(--form-border-color-disabled);
82
- background-color: var(--form-background-color-disabled);
83
- cursor: not-allowed;
109
+
110
+ ::placeholder {
111
+ color: var(--form-font-color-placeholder);
112
+ }
113
+
114
+ input[placeholder],
115
+ input::-moz-placeholder,
116
+ input:-moz-placeholder,
117
+ input:-ms-input-placeholder {
118
+ text-overflow: ellipsis;
119
+ }
120
+
121
+ input,
122
+ textarea,
123
+ select,
124
+ button {
125
+ max-width: var(--form-width);
126
+ font-family: inherit;
127
+ font-size: var(--font-size);
128
+ box-sizing: border-box;
84
129
  box-shadow: none;
85
130
  }
86
-
87
- &:focus {
88
- border-color: var(--form-border-color-focused);
89
- box-shadow: 0 0 0 1px var(--form-border-color-focused);
131
+
132
+ textarea {
133
+ height: auto;
134
+ padding-top: calc(var(--form-side-padding) / 2);
135
+ padding-bottom: calc(var(--form-side-padding) / 2);
90
136
  }
91
- &.error,
92
- &.error:focus,
93
- &[pattern]:invalid,
94
- &[pattern]:invalid:focus {
95
- border-color: var(--form-border-color-error);
96
- box-shadow: 0 0 0 1px var(--form-border-color-error);
137
+
138
+ ::-webkit-file-upload-button {
139
+ cursor:pointer;
97
140
  }
98
- }
99
-
100
- select {
101
- padding-right: calc(var(--form-side-padding) * 2.6);
102
- background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='lucide lucide-chevrons-up-down-icon lucide-chevrons-up-down'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E");
103
- background-position: right calc(var(--form-side-padding) - 4px) top 52%, 0 0;
104
- background-repeat: no-repeat;
105
- background-size: 1.6rem;
106
- }
107
-
108
- ::placeholder {
109
- color: var(--form-font-color-placeholder);
110
- }
111
-
112
- input[placeholder],
113
- input::-moz-placeholder,
114
- input:-moz-placeholder,
115
- input:-ms-input-placeholder {
116
- text-overflow: ellipsis;
117
- }
118
-
119
- input,
120
- textarea,
121
- select,
122
- button {
123
- max-width: var(--form-width);
124
- font-family: inherit;
125
- font-size: var(--font-size);
126
- box-sizing: border-box;
127
- box-shadow: none;
128
- }
129
-
130
- textarea {
131
- height: auto;
132
- padding-top: calc(var(--form-side-padding) / 2);
133
- padding-bottom: calc(var(--form-side-padding) / 2);
134
- }
135
141
 
136
- ::-webkit-file-upload-button {
137
- cursor:pointer;
138
142
  }