unit.gl 0.0.28 → 0.0.30

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.
Files changed (32) hide show
  1. package/css/unit.gl.css +345 -105
  2. package/css/unit.gl.min.css +1 -1
  3. package/package.json +2 -1
  4. package/scss/_global.scss +3 -1
  5. package/scss/_guide.scss +3 -1
  6. package/scss/_helper.scss +2 -4
  7. package/scss/_reset.scss +2 -1
  8. package/scss/classes/_index.scss +17 -0
  9. package/scss/classes/_paper.scss +97 -0
  10. package/scss/display/_device.scss +4 -3
  11. package/scss/display/_display_orientation.scss +3 -5
  12. package/scss/display/_index.scss +13 -0
  13. package/scss/guides/_index.scss +13 -0
  14. package/scss/index.scss +10 -16
  15. package/scss/math/{_math_arithmetic.scss → _arithmetic.scss} +1 -1
  16. package/scss/math/_index.scss +13 -0
  17. package/scss/math/{_math_ratio.scss → _ratio.scss} +1 -1
  18. package/scss/math/{_math_scale.scss → _scale.scss} +1 -1
  19. package/scss/math/{_math_sequence.scss → _sequence.scss} +1 -1
  20. package/scss/mixins/_index.scss +19 -0
  21. package/scss/mixins/_paper.scss +35 -0
  22. package/scss/mixins/_ratio.scss +171 -0
  23. package/scss/mixins/_view.scss +79 -0
  24. package/scss/variables/_index.scss +24 -0
  25. package/scss/{_layer.scss → variables/_layer.scss} +1 -2
  26. package/scss/{_paper.scss → variables/_paper.scss} +3 -109
  27. package/scss/{_scale.scss → variables/_scale.scss} +6 -129
  28. package/scss/{_unit.scss → variables/_unit.scss} +3 -5
  29. package/scss/{_unit_conversion.scss → variables/_unit_conversion.scss} +1 -1
  30. package/scss/{_unit_functions.scss → variables/_unit_functions.scss} +14 -0
  31. package/scss/{_view.scss → variables/_view.scss} +2 -61
  32. package/scss/_ratio.scss +0 -97
@@ -1,10 +1,10 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
- // Licensed under the Apache License, Version 2.00 (the "License");
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
6
6
 
7
- // http://www.apache.org/licenses/LICENSE-2.00
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
8
 
9
9
  // Unless required by applicable law or agreed to in writing, software
10
10
  // distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,6 +16,7 @@
16
16
 
17
17
 
18
18
 
19
+
19
20
  // Device Attribute Map
20
21
  $devices: (
21
22
  // iPhones
@@ -1,10 +1,10 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
- // Licensed under the Apache License, Version 2.00 (the "License");
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
6
6
 
7
- // http://www.apache.org/licenses/LICENSE-2.00
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
8
 
9
9
  // Unless required by applicable law or agreed to in writing, software
10
10
  // distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,8 +17,6 @@
17
17
 
18
18
 
19
19
 
20
-
21
-
22
20
  // Mixins for Media Queries Based on Device Orientation
23
21
  // ============================================================================
24
22
  // These mixins provide a convenient way to apply styles based on the orientation of the device.
@@ -0,0 +1,13 @@
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.
@@ -0,0 +1,13 @@
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/index.scss CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -13,8 +13,6 @@
13
13
  // limitations under the License.
14
14
 
15
15
 
16
- @charset "utf-8";
17
-
18
16
  /**
19
17
  * unit.gl
20
18
  *
@@ -27,28 +25,24 @@
27
25
  * @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
28
26
  */
29
27
 
30
- @use "sass:math";
31
-
28
+ @charset "utf-8";
32
29
 
30
+ @use "sass:math";
33
31
 
34
- @import "_reset";
35
- @import "_global";
36
- @import "_layer";
32
+ @forward "variables";
33
+ @forward "mixins";
37
34
 
38
35
 
39
- @import "_paper";
40
36
 
41
37
 
42
- @import "_view";
38
+ @forward "reset";
39
+ @forward "global";
43
40
 
44
- @import "_unit_functions";
45
- @import "_unit";
46
41
 
47
42
 
48
- // @import "_scale";
43
+ @forward "helper";
44
+ @forward "guide";
49
45
 
50
- // @import "_helper";
51
- // @import "_guide";
52
46
 
53
47
 
54
- // @import "base/base";
48
+ @forward "classes";
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -0,0 +1,13 @@
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.
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -0,0 +1,19 @@
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
+
17
+ @forward "paper";
18
+ @forward "view";
19
+ @forward "ratio";
@@ -0,0 +1,35 @@
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
+ // ============================================================================
17
+ // Paper Module
18
+ // ============================================================================
19
+
20
+ @use "../variables" as *;
21
+
22
+ // Apply Function
23
+ // ============================================================================
24
+
25
+ @mixin set_paper_size($size) {
26
+ @if map-has-key($paper-sizes, $size) {
27
+ $size-map: map-get($paper-sizes, $size);
28
+ width: map-get($size-map, width);
29
+ height: map-get($size-map, height);
30
+ } @else {
31
+ @warn "Invalid paper size: #{$size}.";
32
+ }
33
+ }
34
+
35
+
@@ -0,0 +1,171 @@
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
+ @use "../variables" as *;
16
+
17
+
18
+ // ============================================================================
19
+ // Layout | Ratio
20
+ // ============================================================================
21
+
22
+ // Aspect Ratio Box:
23
+ // Creates a container with a specific aspect ratio.
24
+ // @mixin aspect-ratio($width, $height) {
25
+ // position: relative;
26
+ // &:before {
27
+ // content: '';
28
+ // display: block;
29
+ // padding-top: calc(($height / $width) * 100%);
30
+ // }
31
+ // > * {
32
+ // position: absolute;
33
+ // top: 0;
34
+ // left: 0;
35
+ // right: 0;
36
+ // bottom: 0;
37
+ // }
38
+ // }
39
+
40
+ // .ratio-box {
41
+ // @include aspect-ratio(16, 9);
42
+ // }
43
+
44
+ @mixin ratio ($val01, $val02) {
45
+ aspect-ratio: calc($val01 / $val02);
46
+ width: 100%;
47
+ position: relative;
48
+ overflow: hidden;
49
+ display: inline-block;
50
+ // vertical-align: top;
51
+ }
52
+
53
+ @mixin ratio_1x1 { @include ratio(1, 1); }
54
+ @mixin ratio_1x2 { @include ratio(1, 2); }
55
+ @mixin ratio_2x1 { @include ratio(2, 1); }
56
+ @mixin ratio_1x3 { @include ratio(1, 3); }
57
+ @mixin ratio_3x1 { @include ratio(3, 1); }
58
+ @mixin ratio_1x4 { @include ratio(1, 4); }
59
+ @mixin ratio_4x1 { @include ratio(4, 1); }
60
+ @mixin ratio_3x2 { @include ratio(3, 2); }
61
+ @mixin ratio_2x3 { @include ratio(2, 3); }
62
+ @mixin ratio_4x3 { @include ratio(4, 3); }
63
+ @mixin ratio_3x4 { @include ratio(3, 4); }
64
+ @mixin ratio_16x9 { @include ratio(16, 9); }
65
+ @mixin ratio_16x10 { @include ratio(16, 10); }
66
+
67
+ .ratio_1x1 { @include ratio_1x1; }
68
+ .ratio_1x2 { @include ratio_1x2; }
69
+ .ratio_2x1 { @include ratio_2x1; }
70
+ .ratio_1x3 { @include ratio_1x3; }
71
+ .ratio_3x1 { @include ratio_3x1; }
72
+ .ratio_1x4 { @include ratio_1x4; }
73
+ .ratio_4x1 { @include ratio_4x1; }
74
+ .ratio_3x2 { @include ratio_3x2; }
75
+ .ratio_2x3 { @include ratio_2x3; }
76
+ .ratio_4x3 { @include ratio_4x3; }
77
+ .ratio_3x4 { @include ratio_3x4; }
78
+ .ratio_16x9 { @include ratio_16x9; }
79
+ .ratio_16x10 { @include ratio_16x10; }
80
+
81
+
82
+ // .
83
+ // ----------------------------------------------------------------------------
84
+
85
+ @mixin ratio_p ($val01) {
86
+ padding-bottom: $val01;
87
+ width: 100%;
88
+ position: relative;
89
+ overflow: hidden;
90
+ display: inline-block;
91
+ // vertical-align: top;
92
+ }
93
+
94
+ @mixin ratio_p_1x1 { @include ratio_p(100.00%); }
95
+ @mixin ratio_p_1x2 { @include ratio_p(200.00%); }
96
+ @mixin ratio_p_2x1 { @include ratio_p( 50.00%); }
97
+ @mixin ratio_p_1x3 { @include ratio_p(300.00%); }
98
+ @mixin ratio_p_3x1 { @include ratio_p( 33.33%); }
99
+ @mixin ratio_p_1x4 { @include ratio_p(400.00%); }
100
+ @mixin ratio_p_4x1 { @include ratio_p( 25.00%); }
101
+ @mixin ratio_p_2x3 { @include ratio_p(150.00%); }
102
+ @mixin ratio_p_3x2 { @include ratio_p( 66.67%); }
103
+ @mixin ratio_p_3x4 { @include ratio_p(133.33%); }
104
+ @mixin ratio_p_4x3 { @include ratio_p( 75.00%); }
105
+ @mixin ratio_p_16x9 { @include ratio_p( 56.25%); }
106
+ @mixin ratio_p_16x10 { @include ratio_p( 62.50%); }
107
+
108
+ .ratio_p_1x1 { @include ratio_p_1x1; }
109
+ .ratio_p_1x2 { @include ratio_p_1x2; }
110
+ .ratio_p_2x1 { @include ratio_p_2x1; }
111
+ .ratio_p_1x3 { @include ratio_p_1x3; }
112
+ .ratio_p_3x1 { @include ratio_p_3x1; }
113
+ .ratio_p_1x4 { @include ratio_p_1x4; }
114
+ .ratio_p_4x1 { @include ratio_p_4x1; }
115
+ .ratio_p_3x2 { @include ratio_p_3x2; }
116
+ .ratio_p_2x3 { @include ratio_p_2x3; }
117
+ .ratio_p_4x3 { @include ratio_p_4x3; }
118
+ .ratio_p_3x4 { @include ratio_p_3x4; }
119
+ .ratio_p_16x9 { @include ratio_p_16x9; }
120
+ .ratio_p_16x10 { @include ratio_p_16x10; }
121
+
122
+
123
+
124
+
125
+ // https://github.com/twbs/bootstrap/blob/main/scss/helpers/_ratio.scss
126
+ // Credit: Nicolas Gallagher and SUIT CSS.
127
+
128
+ // .ratio {
129
+ // position: relative;
130
+ // width: 100%;
131
+
132
+ // &::before {
133
+ // display: block;
134
+ // padding-top: var(--#{$prefix}aspect-ratio);
135
+ // content: "";
136
+ // }
137
+
138
+ // > * {
139
+ // position: absolute;
140
+ // top: 0;
141
+ // left: 0;
142
+ // width: 100%;
143
+ // height: 100%;
144
+ // }
145
+ // }
146
+
147
+ // @each $key, $ratio in $aspect-ratios {
148
+ // .ratio-#{$key} {
149
+ // --#{$prefix}aspect-ratio: #{$ratio};
150
+ // }
151
+ // }
152
+
153
+
154
+ // @mixin aspect-ratio($width, $height) {
155
+ // position: relative;
156
+
157
+ // &::before {
158
+ // display: block;
159
+ // content: "";
160
+ // width: 100%;
161
+ // padding-top: calc((#{$height} / #{$width}) * 100%);
162
+ // }
163
+
164
+ // > * {
165
+ // position: absolute;
166
+ // top: 0;
167
+ // right: 0;
168
+ // bottom: 0;
169
+ // left: 0;
170
+ // }
171
+ // }
@@ -0,0 +1,79 @@
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
+ // ============================================================================
19
+ // Media | Screen
20
+ // ============================================================================
21
+
22
+ // Media Query Mixins
23
+ // ============================================================================
24
+
25
+ @mixin breakpoint($size) {
26
+ @if map-has-key($breakpoints, $size) {
27
+ @media (min-width: map-get($breakpoints, $size)) {
28
+ @content;
29
+ }
30
+ } @else {
31
+ @warn "Invalid breakpoint: #{$size}.";
32
+ }
33
+ }
34
+
35
+ @mixin media_xs {
36
+ @media (min-width: $media_xs) { @content; }
37
+ }
38
+
39
+ @mixin media_sm {
40
+ @media (min-width: $media_sm) { @content; }
41
+ }
42
+
43
+
44
+ @mixin media_md {
45
+ @media (min-width: $media_md) { @content; }
46
+ }
47
+
48
+ @mixin media_lg {
49
+ @media (min-width: $media_lg) { @content; }
50
+ }
51
+
52
+
53
+ @mixin media_xl {
54
+ @media (min-width: $media_xl) { @content; }
55
+ }
56
+
57
+ @mixin media_sl {
58
+ @media (min-width: $media_sl) { @content; }
59
+ }
60
+
61
+
62
+ // Example
63
+ // @include breakpoint(md) {
64
+ // // Styles for medium screens and up
65
+ // }
66
+
67
+
68
+ // Syntax
69
+ // @media media type and (condition: breakpoint) {
70
+ // // CSS rules
71
+ // }
72
+
73
+ // @media screen, print {
74
+ // /* … */
75
+ // }
76
+
77
+ // @media (min-width: 30em) and (orientation: landscape) {
78
+ // /* … */
79
+ // }
@@ -0,0 +1,24 @@
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
+ @forward "layer";
17
+ @forward "paper";
18
+
19
+ @forward "unit_conversion";
20
+ @forward "unit_functions";
21
+
22
+ @forward "unit";
23
+
24
+ @forward "scale";
@@ -1,4 +1,4 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -14,7 +14,6 @@
14
14
 
15
15
 
16
16
 
17
-
18
17
  /// Layer Map
19
18
  /// Z-index Layers
20
19
  $layers: (
@@ -1,10 +1,10 @@
1
- // Copyright 2020 Scape Agency BV
1
+ // Copyright 2024 Scape Agency BV
2
2
 
3
- // Licensed under the Apache License, Version 2.00 (the "License");
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
6
6
 
7
- // http://www.apache.org/licenses/LICENSE-2.00
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
8
 
9
9
  // Unless required by applicable law or agreed to in writing, software
10
10
  // distributed under the License is distributed on an "AS IS" BASIS,
@@ -306,109 +306,3 @@ $paper_sizes: (
306
306
  ) !default;
307
307
 
308
308
 
309
- // Apply Function
310
- // ============================================================================
311
-
312
- @mixin set_paper_size($size) {
313
- @if map-has-key($paper-sizes, $size) {
314
- $size-map: map-get($paper-sizes, $size);
315
- width: map-get($size-map, width);
316
- height: map-get($size-map, height);
317
- } @else {
318
- @warn "Invalid paper size: #{$size}.";
319
- }
320
- }
321
-
322
-
323
- $paper_size_ansi_a: map-get($paper_sizes, 'ansi_a');
324
- $paper_size_ansi_b: map-get($paper_sizes, 'ansi_b');
325
- $paper_size_ansi_c: map-get($paper_sizes, 'ansi_c');
326
- $paper_size_ansi_d: map-get($paper_sizes, 'ansi_d');
327
- $paper_size_ansi_e: map-get($paper_sizes, 'ansi_e');
328
-
329
- $paper_size_ansi_a_width: map-get($paper_size_ansi_a, width);
330
- $paper_size_ansi_a_height: map-get($paper_size_ansi_a, height);
331
-
332
- .paper {
333
- &.ansi_a {
334
- width: map-get($paper_size_ansi_a, width);
335
- height: map-get($paper_size_ansi_a, height);
336
- }
337
-
338
- // Add similar classes for other sizes...
339
- }
340
-
341
- // Usage
342
- // ============================================================================
343
-
344
- .paper {
345
-
346
- // Q Series
347
- // ------------------------------------------------------------------------
348
- &.q0 { @include set_paper_size("q0"); }
349
- &.q1 { @include set_paper_size("q1"); }
350
- &.q2 { @include set_paper_size("q2"); }
351
- &.q3 { @include set_paper_size("q3"); }
352
- &.q4 { @include set_paper_size("q4"); }
353
- &.q5 { @include set_paper_size("q5"); }
354
- &.q6 { @include set_paper_size("q6"); }
355
- &.q7 { @include set_paper_size("q7"); }
356
- &.q8 { @include set_paper_size("q8"); }
357
- &.q9 { @include set_paper_size("q9"); }
358
- &.q10 { @include set_paper_size("q10"); }
359
-
360
- // ISO A Series
361
- // ------------------------------------------------------------------------
362
- &.iso_a0 { @include set_paper_size("iso_a0"); }
363
- &.iso_a1 { @include set_paper_size("iso_a1"); }
364
- &.iso_a2 { @include set_paper_size("iso_a2"); }
365
- &.iso_a3 { @include set_paper_size("iso_a3"); }
366
- &.iso_a4 { @include set_paper_size("iso_a4"); }
367
- &.iso_a5 { @include set_paper_size("iso_a5"); }
368
- &.iso_a6 { @include set_paper_size("iso_a6"); }
369
- &.iso_a7 { @include set_paper_size("iso_a7"); }
370
- &.iso_a8 { @include set_paper_size("iso_a8"); }
371
- &.iso_a9 { @include set_paper_size("iso_a9"); }
372
- &.iso_a10 { @include set_paper_size("iso_a10"); }
373
-
374
- }
375
-
376
- // Function to calculate ISO paper sizes
377
- // @function iso-paper-size($number) {
378
- // $base-width: 841mm;
379
- // $base-height: 1189mm;
380
-
381
- // @for $i from 0 through $number {
382
- // $base-width: $base-width / if($i > 0, 2, 1);
383
- // $base-height: $base-height / if($i > 0 and $i % 2 == 0, 2, 1);
384
- // }
385
-
386
- // @return (width: $base-width, height: $base-height);
387
- // }
388
-
389
-
390
- // Function to calculate ISO B-series paper sizes
391
- // @function iso-paper-size-b($number) {
392
- // $base-width: 1000mm; // Approximate base width for B0
393
- // $base-height: 1414mm; // Approximate base height for B0
394
-
395
- // @for $i from 0 through $number {
396
- // $base-width: $base-width / if($i > 0, sqrt(2), 1);
397
- // $base-height: $base-height / if($i > 0 and $i % 2 == 0, sqrt(2), 1);
398
- // }
399
-
400
- // @return (width: $base-width, height: $base-height);
401
- // }
402
-
403
- // Function to calculate ISO C-series paper sizes
404
- // @function iso-paper-size-c($number) {
405
- // $base-width: 917mm; // Approximate base width for C0
406
- // $base-height: 1297mm; // Approximate base height for C0
407
-
408
- // @for $i from 0 through $number {
409
- // $base-width: $base-width / if($i > 0, sqrt(2), 1);
410
- // $base-height: $base-height / if($i > 0 and $i % 2 == 0, sqrt(2), 1);
411
- // }
412
-
413
- // @return (width: $base-width, height: $base-height);
414
- // }