@andreyshpigunov/x 0.5.7 → 0.5.9

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.
@@ -11,52 +11,48 @@ All right reserved.
11
11
  .icon - base icon style
12
12
  .icon[10-60] step 2 (m,l) - icon size in px
13
13
  */
14
+
15
+ .icon,
16
+ .icon > svg,
17
+ .icon > img {
18
+ display: inline-block;
19
+ width: 1em;
20
+ height: 1em;
21
+ max-width: none;
22
+ max-height: none;
23
+ }
24
+ .icon > svg,
25
+ .icon > img {
26
+ display: block;
27
+ }
14
28
 
15
- @layer icons {
16
-
17
- .icon,
18
- .icon > svg,
19
- .icon > img {
20
- display: inline-block;
21
- width: 1em;
22
- height: 1em;
23
- max-width: none;
24
- max-height: none;
29
+ @for $i from 10 to 60 by 2 {
30
+ .icon$(i),
31
+ .icon$(i) > svg,
32
+ .icon$(i) > img {
33
+ width: calc($(i)rem / 10);
34
+ height: calc($(i)rem / 10);
25
35
  }
26
- .icon > svg,
27
- .icon > img {
28
- display: block;
29
- }
30
-
36
+ }
37
+
38
+ @media (min-width: 768px) {
31
39
  @for $i from 10 to 60 by 2 {
32
- .icon$(i),
33
- .icon$(i) > svg,
34
- .icon$(i) > img {
40
+ .m\:icon$(i),
41
+ .m\:icon$(i) > svg,
42
+ .m\:icon$(i) > img {
35
43
  width: calc($(i)rem / 10);
36
44
  height: calc($(i)rem / 10);
37
45
  }
38
46
  }
39
-
40
- @media (min-width: 768px) {
41
- @for $i from 10 to 60 by 2 {
42
- .m\:icon$(i),
43
- .m\:icon$(i) > svg,
44
- .m\:icon$(i) > img {
45
- width: calc($(i)rem / 10);
46
- height: calc($(i)rem / 10);
47
- }
48
- }
49
- }
50
-
51
- @media (min-width: 1024px) {
52
- @for $i from 10 to 60 by 2 {
53
- .l\:icon$(i),
54
- .l\:icon$(i) > svg,
55
- .l\:icon$(i) > img {
56
- width: calc($(i)rem / 10);
57
- height: calc($(i)rem / 10);
58
- }
47
+ }
48
+
49
+ @media (min-width: 1024px) {
50
+ @for $i from 10 to 60 by 2 {
51
+ .l\:icon$(i),
52
+ .l\:icon$(i) > svg,
53
+ .l\:icon$(i) > img {
54
+ width: calc($(i)rem / 10);
55
+ height: calc($(i)rem / 10);
59
56
  }
60
57
  }
61
-
62
58
  }
@@ -21,74 +21,70 @@ All right reserved.
21
21
  a.link_wavy
22
22
  */
23
23
 
24
- @layer links {
24
+ a {
25
25
 
26
- a {
26
+ &[role=button] {
27
+ cursor: pointer;
28
+ }
29
+ &:link,
30
+ &.link {
31
+ outline: none;
32
+ cursor: pointer;
33
+ color: var(--link-color);
34
+ transition: var(--link-transition, all .1s ease-out);
27
35
 
28
- &[role=button] {
29
- cursor: pointer;
30
- }
31
- &:link,
32
- &.link {
33
- outline: none;
34
- cursor: pointer;
35
- color: var(--link-color);
36
- transition: var(--link-transition, all .1s ease-out);
37
-
38
- text-decoration-line: var(--link-decoration-line);
39
- text-decoration-style: var(--link-decoration-style);
40
- text-decoration-color: var(--link-decoration-color, color-mix(in srgb, currentcolor, transparent 75%));
41
- text-decoration-thickness: clamp(1px, var(--link-decoration-thickness, .06em), 10px);
42
- text-underline-offset: var(--link-underline-offset, .25em);
43
- }
44
- &:visited {
45
- color: var(--link-color-visited, var(--link-color));
46
- text-decoration-color: var(--link-decoration-color-visited, currentcolor);
47
- }
48
- @media (any-hover: hover) {
49
- &:hover,
50
- &.hover {
51
- color: var(--link-color-hover, var(--link-color));
52
- text-decoration-line: var(--link-decoration-line-hover, var(--link-decoration-line));
53
- text-decoration-style: var(--link-decoration-style-hover, var(--link-decoration-style));
54
- text-decoration-color: var(--link-decoration-color-hover, currentcolor);
55
- }
56
- }
57
- &:active,
58
- &.active {
36
+ text-decoration-line: var(--link-decoration-line);
37
+ text-decoration-style: var(--link-decoration-style);
38
+ text-decoration-color: var(--link-decoration-color, color-mix(in srgb, currentcolor, transparent 75%));
39
+ text-decoration-thickness: clamp(1px, var(--link-decoration-thickness, .06em), 10px);
40
+ text-underline-offset: var(--link-underline-offset, .25em);
41
+ }
42
+ &:visited {
43
+ color: var(--link-color-visited, var(--link-color));
44
+ text-decoration-color: var(--link-decoration-color-visited, currentcolor);
45
+ }
46
+ @media (any-hover: hover) {
47
+ &:hover,
48
+ &.hover {
59
49
  color: var(--link-color-hover, var(--link-color));
60
50
  text-decoration-line: var(--link-decoration-line-hover, var(--link-decoration-line));
61
51
  text-decoration-style: var(--link-decoration-style-hover, var(--link-decoration-style));
62
52
  text-decoration-color: var(--link-decoration-color-hover, currentcolor);
63
53
  }
64
-
65
- /* Link predefined styles */
66
-
67
- &.link_noline {
68
- --link-decoration-line: none;
69
- }
70
- &.link_underline {
71
- --link-decoration-line: underline;
72
- }
73
- &.link_dashed {
74
- --link-decoration-style: dashed;
75
- }
76
- &.link_dotted {
77
- --link-decoration-style: dotted;
78
- }
79
- &.link_wavy {
80
- --link-decoration-style: wavy;
81
- }
54
+ }
55
+ &:active,
56
+ &.active {
57
+ color: var(--link-color-hover, var(--link-color));
58
+ text-decoration-line: var(--link-decoration-line-hover, var(--link-decoration-line));
59
+ text-decoration-style: var(--link-decoration-style-hover, var(--link-decoration-style));
60
+ text-decoration-color: var(--link-decoration-color-hover, currentcolor);
82
61
  }
83
62
 
63
+ /* Link predefined styles */
84
64
 
85
- /* Remove underline from phones */
86
-
87
- a[href^="tel"],
88
- a[href^="tel"]:hover,
89
- a[href^="tel"]:active {
90
- color: inherit;
91
- text-decoration: inherit;
65
+ &.link_noline {
66
+ --link-decoration-line: none;
67
+ }
68
+ &.link_underline {
69
+ --link-decoration-line: underline;
70
+ }
71
+ &.link_dashed {
72
+ --link-decoration-style: dashed;
92
73
  }
74
+ &.link_dotted {
75
+ --link-decoration-style: dotted;
76
+ }
77
+ &.link_wavy {
78
+ --link-decoration-style: wavy;
79
+ }
80
+ }
81
+
82
+
83
+ /* Remove underline from phones */
93
84
 
85
+ a[href^="tel"],
86
+ a[href^="tel"]:hover,
87
+ a[href^="tel"]:active {
88
+ color: inherit;
89
+ text-decoration: inherit;
94
90
  }
@@ -7,245 +7,241 @@ All right reserved.
7
7
  ----------------------------------------*/
8
8
 
9
9
 
10
- @layer modal {
10
+ html.modal_active body {
11
+ overflow: hidden;
12
+ }
11
13
 
12
- html.modal_active body {
13
- overflow: hidden;
14
- }
15
-
16
- /* !- Modal window content */
17
- [x-modal] {
18
- display: none;
19
- }
14
+ /* !- Modal window content */
15
+ [x-modal] {
16
+ display: none;
17
+ }
18
+
19
+ /* !- Modal wrapper */
20
+ .modal {
21
+ position: fixed;
22
+ z-index: -10000;
23
+ top: 0;
24
+ bottom: 0;
25
+ left: 0;
26
+ right: 0;
27
+ padding: 0;
28
+ pointer-events: none;
29
+ display: none;
30
+ }
31
+ .modal_ready {
32
+ z-index: 10000;
33
+ pointer-events: all;
34
+ display: block;
35
+ }
36
+ .modal_z1 { z-index: 10001 }
37
+ .modal_z2 { z-index: 10002 }
38
+ .modal_z3 { z-index: 10003 }
39
+ .modal_z4 { z-index: 10004 }
40
+ .modal_z5 { z-index: 10005 }
41
+ .modal_z6 { z-index: 10006 }
42
+ .modal_z7 { z-index: 10007 }
43
+ .modal_z8 { z-index: 10008 }
44
+ .modal_z9 { z-index: 10009 }
45
+ .modal_z10 { z-index: 10010 }
46
+
47
+ /* !- Overlay */
48
+ .modal-overlay {
49
+ position: absolute;
50
+ z-index: 10010;
51
+ top: 0;
52
+ bottom: 0;
53
+ left: 0;
54
+ right: 0;
55
+ background-color: var(--modal-overlay-background-color);
56
+ }
57
+
58
+ /* ! -Main structure */
59
+ .modal-outer {
60
+ position: relative;
61
+ z-index: 10020;
62
+ width: 100%;
63
+ height: 100%;
64
+ padding-top: var(--modal-margin-top);
65
+ padding-bottom: var(--modal-margin-bottom);
66
+ padding-left: var(--modal-margin-left);
67
+ padding-right: var(--modal-margin-right);
68
+ overflow: auto;
69
+ overscroll-behavior: contain;
70
+ -webkit-overflow-scrolling: touch;
71
+ }
72
+ .modal-inner {
73
+ display: flex;
74
+ flex-direction: column;
75
+ min-height: 100%;
76
+ }
77
+
78
+ /* !- Modal window */
79
+ .modal-window {
80
+ position: relative;
81
+ z-index: 10030;
82
+ width: 100%;
83
+ max-width: 80rem;
84
+ margin: auto;
85
+ padding-top: var(--modal-padding-top);
86
+ padding-bottom: var(--modal-padding-bottom);
87
+ padding-left: var(--modal-padding-left);
88
+ padding-right: var(--modal-padding-right);
89
+ text-align: left;
90
+ background: var(--modal-background);
91
+ box-shadow: var(--modal-box-shadow);
92
+ border-radius: var(--modal-border-radius);
93
+ }
94
+
95
+ /* !- Close cross */
96
+ .modal-rail {
97
+ position: absolute;
98
+ top: var(--modal-closer-margin);
99
+ bottom: var(--modal-closer-margin);
100
+ right: var(--modal-closer-margin);
101
+ width: 0;
20
102
 
21
- /* !- Modal wrapper */
22
- .modal {
23
- position: fixed;
24
- z-index: -10000;
25
- top: 0;
26
- bottom: 0;
27
- left: 0;
28
- right: 0;
29
- padding: 0;
30
- pointer-events: none;
31
- display: none;
32
- }
33
- .modal_ready {
34
- z-index: 10000;
35
- pointer-events: all;
103
+ .modal-close {
36
104
  display: block;
37
- }
38
- .modal_z1 { z-index: 10001 }
39
- .modal_z2 { z-index: 10002 }
40
- .modal_z3 { z-index: 10003 }
41
- .modal_z4 { z-index: 10004 }
42
- .modal_z5 { z-index: 10005 }
43
- .modal_z6 { z-index: 10006 }
44
- .modal_z7 { z-index: 10007 }
45
- .modal_z8 { z-index: 10008 }
46
- .modal_z9 { z-index: 10009 }
47
- .modal_z10 { z-index: 10010 }
48
-
49
- /* !- Overlay */
50
- .modal-overlay {
51
- position: absolute;
52
- z-index: 10010;
53
- top: 0;
54
- bottom: 0;
55
- left: 0;
56
- right: 0;
57
- background-color: var(--modal-overlay-background-color);
58
- }
59
-
60
- /* ! -Main structure */
61
- .modal-outer {
62
- position: relative;
63
- z-index: 10020;
64
- width: 100%;
65
- height: 100%;
66
- padding-top: var(--modal-margin-top);
67
- padding-bottom: var(--modal-margin-bottom);
68
- padding-left: var(--modal-margin-left);
69
- padding-right: var(--modal-margin-right);
70
- overflow: auto;
71
- overscroll-behavior: contain;
72
- -webkit-overflow-scrolling: touch;
73
- }
74
- .modal-inner {
75
- display: flex;
76
- flex-direction: column;
77
- min-height: 100%;
78
- }
79
-
80
- /* !- Modal window */
81
- .modal-window {
82
- position: relative;
83
- z-index: 10030;
84
- width: 100%;
85
- max-width: 80rem;
86
- margin: auto;
87
- padding-top: var(--modal-padding-top);
88
- padding-bottom: var(--modal-padding-bottom);
89
- padding-left: var(--modal-padding-left);
90
- padding-right: var(--modal-padding-right);
91
- text-align: left;
105
+ position: sticky;
106
+ z-index: 10040;
107
+ top: calc(var(--modal-closer-margin) - var(--modal-margin-top));
92
108
  background: var(--modal-background);
93
- box-shadow: var(--modal-box-shadow);
109
+ width: var(--modal-closer-area);
110
+ height: var(--modal-closer-area);
111
+ margin-left: calc(-1 * var(--modal-closer-area));
112
+ font-weight: 200;
113
+ border: none;
94
114
  border-radius: var(--modal-border-radius);
95
- }
96
-
97
- /* !- Close cross */
98
- .modal-rail {
99
- position: absolute;
100
- top: var(--modal-closer-margin);
101
- bottom: var(--modal-closer-margin);
102
- right: var(--modal-closer-margin);
103
- width: 0;
104
115
 
105
- .modal-close {
116
+ will-change: opacity;
117
+ opacity: 0;
118
+ transition: opacity .15s ease-out;
119
+
120
+ &:before,
121
+ &:after {
122
+ content: "";
106
123
  display: block;
107
- position: sticky;
108
- z-index: 10040;
109
- top: calc(var(--modal-closer-margin) - var(--modal-margin-top));
110
- background: var(--modal-background);
111
- width: var(--modal-closer-area);
112
- height: var(--modal-closer-area);
113
- margin-left: calc(-1 * var(--modal-closer-area));
114
- font-weight: 200;
115
- border: none;
116
- border-radius: var(--modal-border-radius);
124
+ position: absolute;
125
+ top: calc(var(--modal-closer-area) / 2 - var(--modal-closer-width) / 2);
126
+ left: calc((var(--modal-closer-area) - var(--modal-closer-size)) / 2);
127
+ width: var(--modal-closer-size);
128
+ height: var(--modal-closer-width);
117
129
 
118
- will-change: opacity;
119
- opacity: 0;
120
- transition: opacity .15s ease-out;
121
-
122
- &:before,
123
- &:after {
124
- content: "";
125
- display: block;
126
- position: absolute;
127
- top: calc(var(--modal-closer-area) / 2 - var(--modal-closer-width) / 2);
128
- left: calc((var(--modal-closer-area) - var(--modal-closer-size)) / 2);
129
- width: var(--modal-closer-size);
130
- height: var(--modal-closer-width);
131
-
132
- will-change: color;
133
- background: var(--modal-closer-color);
134
- transition: background .15s ease-out;
135
- transform-origin: center;
136
- }
137
- &:before {
138
- transform: rotate(-45deg);
139
- }
140
- &:after {
141
- transform: rotate(45deg);
142
- }
130
+ will-change: color;
131
+ background: var(--modal-closer-color);
132
+ transition: background .15s ease-out;
133
+ transform-origin: center;
134
+ }
135
+ &:before {
136
+ transform: rotate(-45deg);
137
+ }
138
+ &:after {
139
+ transform: rotate(45deg);
143
140
  }
144
141
  }
145
- .modal_active .modal-rail {
142
+ }
143
+ .modal_active .modal-rail {
144
+
145
+ .modal-close {
146
+ opacity: 1;
146
147
 
147
- .modal-close {
148
- opacity: 1;
149
-
150
- @media (any-hover: hover) {
151
- &:hover:before,
152
- &:hover:after,
153
- &:active:before,
154
- &:active:after {
155
- background: var(--modal-closer-color-hover);
156
- }
148
+ @media (any-hover: hover) {
149
+ &:hover:before,
150
+ &:hover:after,
151
+ &:active:before,
152
+ &:active:after {
153
+ background: var(--modal-closer-color-hover);
157
154
  }
158
155
  }
159
156
  }
160
-
161
- /*
162
- !- Effects
163
- https://github.com/codrops/ModalWindowEffects
164
- */
165
- .modal {
166
- & .modal-overlay {
167
- will-change: opacity;
168
- opacity: 0;
169
- transition: opacity .2s ease-out;
170
- }
171
- &.modal_active .modal-overlay {
172
- opacity: 1;
173
- }
157
+ }
158
+
159
+ /*
160
+ !- Effects
161
+ https://github.com/codrops/ModalWindowEffects
162
+ */
163
+ .modal {
164
+ & .modal-overlay {
165
+ will-change: opacity;
166
+ opacity: 0;
167
+ transition: opacity .2s ease-out;
168
+ }
169
+ &.modal_active .modal-overlay {
170
+ opacity: 1;
174
171
  }
175
-
176
- /* !- Default */
177
- .modal {
178
- & .modal-window {
179
- will-change: visibility, opacity, transform;
180
- opacity: 0;
181
- transform: scale(.97);
182
- transform-origin: center top;
183
- transition: all .2s ease-out;
184
- }
185
- &.modal_active .modal-window {
186
- transform: scale(1);
187
- opacity: 1;
188
- }
172
+ }
173
+
174
+ /* !- Default */
175
+ .modal {
176
+ & .modal-window {
177
+ will-change: visibility, opacity, transform;
178
+ opacity: 0;
179
+ transform: scale(.97);
180
+ transform-origin: center top;
181
+ transition: all .2s ease-out;
182
+ }
183
+ &.modal_active .modal-window {
184
+ transform: scale(1);
185
+ opacity: 1;
189
186
  }
190
-
191
- /* !- Zoom in */
192
- .modal_effect-in {
193
- & .modal-window {
194
- transform: scale(.9);
195
- }
196
- &.modal_active .modal-window {
197
- transform: scale(1);
198
- }
187
+ }
188
+
189
+ /* !- Zoom in */
190
+ .modal_effect-in {
191
+ & .modal-window {
192
+ transform: scale(.9);
199
193
  }
200
-
201
- /* !- Zoom out */
202
- .modal_effect-out {
203
- & .modal-window {
204
- transform: scale(1.1);
205
- }
206
- &.modal_active .modal-window {
207
- transform: scale(1);
208
- }
194
+ &.modal_active .modal-window {
195
+ transform: scale(1);
209
196
  }
210
-
211
- /* !- Slide up */
212
- .modal_effect-up {
213
- & .modal-window {
214
- transform: translateY(30px);
215
- }
216
- &.modal_active .modal-window {
217
- transform: translateY(0);
218
- }
197
+ }
198
+
199
+ /* !- Zoom out */
200
+ .modal_effect-out {
201
+ & .modal-window {
202
+ transform: scale(1.1);
219
203
  }
220
-
221
- /* !- Slide down */
222
- .modal_effect-down {
223
- & .modal-window {
224
- transform: translateY(-30px);
225
- }
226
- &.modal_active .modal-window {
227
- transform: translateY(0);
228
- }
204
+ &.modal_active .modal-window {
205
+ transform: scale(1);
229
206
  }
230
-
231
- /* !- Slide from left */
232
- .modal_effect-left {
233
- & .modal-window {
234
- transform: translateX(-30px);
235
- }
236
- &.modal_active .modal-window {
237
- transform: translateX(0);
238
- }
207
+ }
208
+
209
+ /* !- Slide up */
210
+ .modal_effect-up {
211
+ & .modal-window {
212
+ transform: translateY(30px);
239
213
  }
240
-
241
- /* !- Slide from right */
242
- .modal_effect-right {
243
- & .modal-window {
244
- transform: translateX(30px);
245
- }
246
- &.modal_active .modal-window {
247
- transform: translateX(0);
248
- }
214
+ &.modal_active .modal-window {
215
+ transform: translateY(0);
249
216
  }
217
+ }
250
218
 
219
+ /* !- Slide down */
220
+ .modal_effect-down {
221
+ & .modal-window {
222
+ transform: translateY(-30px);
223
+ }
224
+ &.modal_active .modal-window {
225
+ transform: translateY(0);
226
+ }
227
+ }
228
+
229
+ /* !- Slide from left */
230
+ .modal_effect-left {
231
+ & .modal-window {
232
+ transform: translateX(-30px);
233
+ }
234
+ &.modal_active .modal-window {
235
+ transform: translateX(0);
236
+ }
237
+ }
238
+
239
+ /* !- Slide from right */
240
+ .modal_effect-right {
241
+ & .modal-window {
242
+ transform: translateX(30px);
243
+ }
244
+ &.modal_active .modal-window {
245
+ transform: translateX(0);
246
+ }
251
247
  }