unit.gl 0.0.30 → 0.0.32
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/css/unit.gl.css +81 -59
- package/css/unit.gl.min.css +1 -1
- package/package.json +1 -1
- package/scss/index.scss +0 -10
- package/scss/mixins/_device.scss +42 -0
- package/scss/{display/_display_orientation.scss → mixins/_display.scss} +6 -8
- package/scss/{_guide.scss → mixins/_guide.scss} +1 -1
- package/scss/{_helper.scss → mixins/_helper.scss} +1 -1
- package/scss/mixins/_index.scss +4 -0
- package/scss/{display → variables}/_device.scss +2 -29
- package/scss/variables/_index.scss +8 -0
- package/scss/guides/_index.scss +0 -13
- package/scss/math/_index.scss +0 -13
- /package/scss/{math → functions}/_arithmetic.scss +0 -0
- /package/scss/{display → functions}/_index.scss +0 -0
- /package/scss/{math → functions}/_ratio.scss +0 -0
- /package/scss/{math → functions}/_scale.scss +0 -0
- /package/scss/{math → functions}/_sequence.scss +0 -0
package/css/unit.gl.css
CHANGED
|
@@ -268,6 +268,87 @@ html {
|
|
|
268
268
|
display: inline-block;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
/**
|
|
272
|
+
* unit.gl
|
|
273
|
+
*
|
|
274
|
+
* @description Layout Engine
|
|
275
|
+
* @author Scape Agency (https://www.scape.agency)
|
|
276
|
+
* @version v1.0.0
|
|
277
|
+
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
278
|
+
* @website https://www.unit.gl/
|
|
279
|
+
* @repository https://github.com/scape-agency/unit.gl/
|
|
280
|
+
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
281
|
+
*/
|
|
282
|
+
/**
|
|
283
|
+
* unit.gl
|
|
284
|
+
*
|
|
285
|
+
* @description Layout Engine
|
|
286
|
+
* @author Scape Agency (https://www.scape.agency)
|
|
287
|
+
* @version v1.0.0
|
|
288
|
+
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
289
|
+
* @website https://www.unit.gl/
|
|
290
|
+
* @repository https://github.com/scape-agency/unit.gl/
|
|
291
|
+
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
292
|
+
*/
|
|
293
|
+
/**
|
|
294
|
+
* unit.gl
|
|
295
|
+
*
|
|
296
|
+
* @description Layout Engine
|
|
297
|
+
* @author Scape Agency (https://www.scape.agency)
|
|
298
|
+
* @version v1.0.0
|
|
299
|
+
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
300
|
+
* @website https://www.unit.gl/
|
|
301
|
+
* @repository https://github.com/scape-agency/unit.gl/
|
|
302
|
+
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
303
|
+
*/
|
|
304
|
+
.guide {
|
|
305
|
+
position: absolute;
|
|
306
|
+
top: 0;
|
|
307
|
+
left: 0;
|
|
308
|
+
width: 100%;
|
|
309
|
+
height: 100%;
|
|
310
|
+
margin: 0;
|
|
311
|
+
pointer-events: none;
|
|
312
|
+
z-index: 9999;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.guide_graph {
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: 0;
|
|
318
|
+
left: 0;
|
|
319
|
+
width: 100%;
|
|
320
|
+
height: 100%;
|
|
321
|
+
margin: 0;
|
|
322
|
+
pointer-events: none;
|
|
323
|
+
z-index: 9999;
|
|
324
|
+
background-size: 0.25rem 0.25rem;
|
|
325
|
+
background-image: repeating-linear-gradient(to bottom, rgba(50, 50, 50, 0.25) 0 1px, transparent 1px 100%), repeating-linear-gradient(to right, rgba(50, 50, 50, 0.25) 0 1px, transparent 1px 100%);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.guide_baseline {
|
|
329
|
+
position: absolute;
|
|
330
|
+
top: 0;
|
|
331
|
+
left: 0;
|
|
332
|
+
width: 100%;
|
|
333
|
+
height: 100%;
|
|
334
|
+
margin: 0;
|
|
335
|
+
pointer-events: none;
|
|
336
|
+
z-index: 9999;
|
|
337
|
+
background-size: 100% 1.5rem;
|
|
338
|
+
background-image: repeating-linear-gradient(to bottom, cyan 0 1px, transparent 1px 100%);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* unit.gl
|
|
343
|
+
*
|
|
344
|
+
* @description Layout Engine
|
|
345
|
+
* @author Scape Agency (https://www.scape.agency)
|
|
346
|
+
* @version v1.0.0
|
|
347
|
+
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
348
|
+
* @website https://www.unit.gl/
|
|
349
|
+
* @repository https://github.com/scape-agency/unit.gl/
|
|
350
|
+
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
351
|
+
*/
|
|
271
352
|
/**
|
|
272
353
|
* unit.gl
|
|
273
354
|
*
|
|
@@ -466,65 +547,6 @@ html, body {
|
|
|
466
547
|
margin: 0;
|
|
467
548
|
}
|
|
468
549
|
|
|
469
|
-
/**
|
|
470
|
-
* unit.gl
|
|
471
|
-
*
|
|
472
|
-
* @description Layout Engine
|
|
473
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
474
|
-
* @version v1.0.0
|
|
475
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
476
|
-
* @website https://www.unit.gl/
|
|
477
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
478
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
479
|
-
*/
|
|
480
|
-
/**
|
|
481
|
-
* unit.gl
|
|
482
|
-
*
|
|
483
|
-
* @description Layout Engine
|
|
484
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
485
|
-
* @version v1.0.0
|
|
486
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
487
|
-
* @website https://www.unit.gl/
|
|
488
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
489
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
490
|
-
*/
|
|
491
|
-
.guide {
|
|
492
|
-
position: absolute;
|
|
493
|
-
top: 0;
|
|
494
|
-
left: 0;
|
|
495
|
-
width: 100%;
|
|
496
|
-
height: 100%;
|
|
497
|
-
margin: 0;
|
|
498
|
-
pointer-events: none;
|
|
499
|
-
z-index: 9999;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.guide_graph {
|
|
503
|
-
position: absolute;
|
|
504
|
-
top: 0;
|
|
505
|
-
left: 0;
|
|
506
|
-
width: 100%;
|
|
507
|
-
height: 100%;
|
|
508
|
-
margin: 0;
|
|
509
|
-
pointer-events: none;
|
|
510
|
-
z-index: 9999;
|
|
511
|
-
background-size: 0.25rem 0.25rem;
|
|
512
|
-
background-image: repeating-linear-gradient(to bottom, rgba(50, 50, 50, 0.25) 0 1px, transparent 1px 100%), repeating-linear-gradient(to right, rgba(50, 50, 50, 0.25) 0 1px, transparent 1px 100%);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
.guide_baseline {
|
|
516
|
-
position: absolute;
|
|
517
|
-
top: 0;
|
|
518
|
-
left: 0;
|
|
519
|
-
width: 100%;
|
|
520
|
-
height: 100%;
|
|
521
|
-
margin: 0;
|
|
522
|
-
pointer-events: none;
|
|
523
|
-
z-index: 9999;
|
|
524
|
-
background-size: 100% 1.5rem;
|
|
525
|
-
background-image: repeating-linear-gradient(to bottom, cyan 0 1px, transparent 1px 100%);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
550
|
/**
|
|
529
551
|
* unit.gl
|
|
530
552
|
*
|
package/css/unit.gl.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--q:$q}html{font-size:12px}@media screen and (min-width:320px){html{font-size:calc(12px + unit_strip(12px)*(100vw - 320px)/unit_strip(1120px))}}@media screen and (min-width:1440px){html{font-size:24px}}.ratio_1x1{aspect-ratio:1}.ratio_1x1,.ratio_1x2{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x2{aspect-ratio:.5}.ratio_2x1{aspect-ratio:2}.ratio_1x3,.ratio_2x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x3{aspect-ratio:.3333333333}.ratio_3x1{aspect-ratio:3}.ratio_1x4,.ratio_3x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x4{aspect-ratio:.25}.ratio_4x1{aspect-ratio:4}.ratio_3x2,.ratio_4x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_3x2{aspect-ratio:1.5}.ratio_2x3{aspect-ratio:.6666666667}.ratio_2x3,.ratio_4x3{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_4x3{aspect-ratio:1.3333333333}.ratio_3x4{aspect-ratio:.75}.ratio_16x9,.ratio_3x4{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_16x9{aspect-ratio:1.7777777778}.ratio_16x10{aspect-ratio:1.6}.ratio_16x10,.ratio_p_1x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_1x1{padding-bottom:100%}.ratio_p_1x2{padding-bottom:200%}.ratio_p_1x2,.ratio_p_2x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_2x1{padding-bottom:50%}.ratio_p_1x3{padding-bottom:300%}.ratio_p_1x3,.ratio_p_3x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_3x1{padding-bottom:33.33%}.ratio_p_1x4{padding-bottom:400%}.ratio_p_1x4,.ratio_p_4x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_4x1{padding-bottom:25%}.ratio_p_3x2{padding-bottom:66.67%}.ratio_p_2x3,.ratio_p_3x2{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_2x3{padding-bottom:150%}.ratio_p_4x3{padding-bottom:75%}.ratio_p_3x4,.ratio_p_4x3{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_3x4{padding-bottom:133.33%}.ratio_p_16x9{padding-bottom:56.25%}.ratio_p_16x10,.ratio_p_16x9{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_16x10{padding-bottom:62.5%}*,a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bb,bdo,big,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,eventsource,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,img,input,ins,isindex,kbd,keygen,label,legend,li,link,map,mark,menu,meta,meter,nav,noframes,noscript,object,ol,optgroup,option,output,p,param,pre,progress,q,rp,rt,ruby,s,samp,script,section,select,small,source,span,strike,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr{margin:0;-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:0;margin-inline-end:0;padding:0}html{box-sizing:border-box;-webkit-text-size-adjust:100%;height:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-break:normal}body{height:100vh;margin:0;min-height:100%;position:absolute;width:100vw}body,html{height:100%;margin:0}*,:after,:before{background-repeat:no-repeat;box-sizing:inherit}:after,:before{text-decoration:inherit;vertical-align:inherit}*{margin:0;padding:0}
|
|
1
|
+
:root{--q:$q}html{font-size:12px}@media screen and (min-width:320px){html{font-size:calc(12px + unit_strip(12px)*(100vw - 320px)/unit_strip(1120px))}}@media screen and (min-width:1440px){html{font-size:24px}}.ratio_1x1{aspect-ratio:1}.ratio_1x1,.ratio_1x2{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x2{aspect-ratio:.5}.ratio_2x1{aspect-ratio:2}.ratio_1x3,.ratio_2x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x3{aspect-ratio:.3333333333}.ratio_3x1{aspect-ratio:3}.ratio_1x4,.ratio_3x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x4{aspect-ratio:.25}.ratio_4x1{aspect-ratio:4}.ratio_3x2,.ratio_4x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_3x2{aspect-ratio:1.5}.ratio_2x3{aspect-ratio:.6666666667}.ratio_2x3,.ratio_4x3{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_4x3{aspect-ratio:1.3333333333}.ratio_3x4{aspect-ratio:.75}.ratio_16x9,.ratio_3x4{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_16x9{aspect-ratio:1.7777777778}.ratio_16x10{aspect-ratio:1.6}.ratio_16x10,.ratio_p_1x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_1x1{padding-bottom:100%}.ratio_p_1x2{padding-bottom:200%}.ratio_p_1x2,.ratio_p_2x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_2x1{padding-bottom:50%}.ratio_p_1x3{padding-bottom:300%}.ratio_p_1x3,.ratio_p_3x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_3x1{padding-bottom:33.33%}.ratio_p_1x4{padding-bottom:400%}.ratio_p_1x4,.ratio_p_4x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_4x1{padding-bottom:25%}.ratio_p_3x2{padding-bottom:66.67%}.ratio_p_2x3,.ratio_p_3x2{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_2x3{padding-bottom:150%}.ratio_p_4x3{padding-bottom:75%}.ratio_p_3x4,.ratio_p_4x3{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_3x4{padding-bottom:133.33%}.ratio_p_16x9{padding-bottom:56.25%}.ratio_p_16x10,.ratio_p_16x9{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_16x10{padding-bottom:62.5%}.guide,.guide_graph{height:100%;left:0;margin:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:9999}.guide_graph{background-image:repeating-linear-gradient(180deg,rgba(50,50,50,.25) 0 1px,transparent 1px 100%),repeating-linear-gradient(90deg,rgba(50,50,50,.25) 0 1px,transparent 1px 100%);background-size:.25rem .25rem}.guide_baseline{background-image:repeating-linear-gradient(180deg,cyan 0 1px,transparent 1px 100%);background-size:100% 1.5rem;height:100%;left:0;margin:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:9999}*,a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bb,bdo,big,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,eventsource,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,img,input,ins,isindex,kbd,keygen,label,legend,li,link,map,mark,menu,meta,meter,nav,noframes,noscript,object,ol,optgroup,option,output,p,param,pre,progress,q,rp,rt,ruby,s,samp,script,section,select,small,source,span,strike,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr{margin:0;-webkit-margin-before:0;margin-block-start:0;-webkit-margin-after:0;margin-block-end:0;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:0;margin-inline-end:0;padding:0}html{box-sizing:border-box;-webkit-text-size-adjust:100%;height:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-break:normal}body{height:100vh;margin:0;min-height:100%;position:absolute;width:100vw}body,html{height:100%;margin:0}*,:after,:before{background-repeat:no-repeat;box-sizing:inherit}:after,:before{text-decoration:inherit;vertical-align:inherit}*{margin:0;padding:0}
|
|
2
2
|
/*# sourceMappingURL=to.css.map */
|
package/package.json
CHANGED
package/scss/index.scss
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2024 Scape Agency BV
|
|
2
|
+
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@use "../variables" as *;
|
|
17
|
+
|
|
18
|
+
/// Generalized Media Query Mixin
|
|
19
|
+
/// Creates a media query based on device attributes defined in $devices map.
|
|
20
|
+
/// @param $device - The key name of the device in the $devices map.
|
|
21
|
+
/// Usage Example:
|
|
22
|
+
/// @include device-media-query('iphone-6-7-8') {// Styles specific to iPhone 6, 7, 8}
|
|
23
|
+
@mixin device-media-query($device) {
|
|
24
|
+
// Retrieve the device attributes from the map
|
|
25
|
+
$attributes: map-get($devices, $device);
|
|
26
|
+
|
|
27
|
+
// Extract individual attributes with default fallbacks
|
|
28
|
+
$min-width: if(map-has-key($attributes, "min-width"), map-get($attributes, "min-width"), null);
|
|
29
|
+
$max-width: if(map-has-key($attributes, "max-width"), map-get($attributes, "max-width"), null);
|
|
30
|
+
$pixel-ratio: if(map-has-key($attributes, "pixel-ratio"), map-get($attributes, "pixel-ratio"), 1); // Default to 1
|
|
31
|
+
|
|
32
|
+
// Construct the media query string
|
|
33
|
+
$media-query: "only screen";
|
|
34
|
+
$media-query: if($min-width != null, $media-query + " and (min-device-width: #{$min-width})", $media-query);
|
|
35
|
+
$media-query: if($max-width != null, $media-query + " and (max-device-width: #{$max-width})", $media-query);
|
|
36
|
+
$media-query: if($pixel-ratio != 1, $media-query + " and (-webkit-device-pixel-ratio: #{$pixel-ratio})", $media-query);
|
|
37
|
+
|
|
38
|
+
// Apply the media query
|
|
39
|
+
@media #{$media-query} {
|
|
40
|
+
@content;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
@use "../variables" as *;
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
@@ -61,14 +62,11 @@
|
|
|
61
62
|
/// Mixin for targeting specific aspect ratios
|
|
62
63
|
/// @param $width - Width of the aspect ratio
|
|
63
64
|
/// @param $height - Height of the aspect ratio
|
|
64
|
-
@mixin aspect-ratio($width, $height) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
// @mixin aspect-ratio($width, $height) {
|
|
66
|
+
// @media (aspect-ratio: #{$width}/#{$height}) {
|
|
67
|
+
// @content;
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
72
70
|
|
|
73
71
|
|
|
74
72
|
|
package/scss/mixins/_index.scss
CHANGED
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
18
|
// Device Attribute Map
|
|
21
19
|
$devices: (
|
|
22
20
|
// iPhones
|
|
@@ -64,7 +62,7 @@ $devices: (
|
|
|
64
62
|
// ------------------------------------------------------------------------
|
|
65
63
|
"macbook-air": ("min-width": 1440px, "max-width": 2560px, "pixel-ratio": 2),
|
|
66
64
|
"macbook-pro": ("min-width": 1680px, "max-width": 3072px, "pixel-ratio": 2),
|
|
67
|
-
"imac": ("min-width": 1920px, "max-width": 5120px, "pixel-ratio": 2)
|
|
65
|
+
"imac": ("min-width": 1920px, "max-width": 5120px, "pixel-ratio": 2),
|
|
68
66
|
|
|
69
67
|
// Additional Devices
|
|
70
68
|
// ------------------------------------------------------------------------
|
|
@@ -75,33 +73,8 @@ $devices: (
|
|
|
75
73
|
"xiaomi-mi9": ("min-width": 393px, "max-width": 851px, "pixel-ratio": 3),
|
|
76
74
|
"surface-book": ("min-width": 1500px, "max-width": 2000px, "pixel-ratio": 2),
|
|
77
75
|
"dell-xps": ("min-width": 1920px, "max-width": 3840px, "pixel-ratio": 2),
|
|
78
|
-
"lenovo-thinkpad": ("min-width": 1440px, "max-width": 2560px, "pixel-ratio": 2)
|
|
76
|
+
"lenovo-thinkpad": ("min-width": 1440px, "max-width": 2560px, "pixel-ratio": 2),
|
|
79
77
|
|
|
80
78
|
);
|
|
81
79
|
|
|
82
80
|
|
|
83
|
-
/// Generalized Media Query Mixin
|
|
84
|
-
/// Creates a media query based on device attributes defined in $devices map.
|
|
85
|
-
/// @param $device - The key name of the device in the $devices map.
|
|
86
|
-
/// Usage Example:
|
|
87
|
-
/// @include device-media-query('iphone-6-7-8') {// Styles specific to iPhone 6, 7, 8}
|
|
88
|
-
@mixin device-media-query($device) {
|
|
89
|
-
// Retrieve the device attributes from the map
|
|
90
|
-
$attributes: map-get($devices, $device);
|
|
91
|
-
|
|
92
|
-
// Extract individual attributes with default fallbacks
|
|
93
|
-
$min-width: if(map-has-key($attributes, "min-width"), map-get($attributes, "min-width"), null);
|
|
94
|
-
$max-width: if(map-has-key($attributes, "max-width"), map-get($attributes, "max-width"), null);
|
|
95
|
-
$pixel-ratio: if(map-has-key($attributes, "pixel-ratio"), map-get($attributes, "pixel-ratio"), 1); // Default to 1
|
|
96
|
-
|
|
97
|
-
// Construct the media query string
|
|
98
|
-
$media-query: "only screen";
|
|
99
|
-
$media-query: if($min-width != null, $media-query + " and (min-device-width: #{$min-width})", $media-query);
|
|
100
|
-
$media-query: if($max-width != null, $media-query + " and (max-device-width: #{$max-width})", $media-query);
|
|
101
|
-
$media-query: if($pixel-ratio != 1, $media-query + " and (-webkit-device-pixel-ratio: #{$pixel-ratio})", $media-query);
|
|
102
|
-
|
|
103
|
-
// Apply the media query
|
|
104
|
-
@media #{$media-query} {
|
|
105
|
-
@content;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Unit.gl | Variables
|
|
18
|
+
// ============================================================================
|
|
19
|
+
|
|
16
20
|
@forward "layer";
|
|
17
21
|
@forward "paper";
|
|
18
22
|
|
|
@@ -22,3 +26,7 @@
|
|
|
22
26
|
@forward "unit";
|
|
23
27
|
|
|
24
28
|
@forward "scale";
|
|
29
|
+
|
|
30
|
+
@forward "view";
|
|
31
|
+
|
|
32
|
+
@forward "device";
|
package/scss/guides/_index.scss
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 Scape Agency BV
|
|
2
|
-
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
package/scss/math/_index.scss
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2024 Scape Agency BV
|
|
2
|
-
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|