unit.gl 0.0.29 → 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.
- package/css/unit.gl.css +266 -271
- package/css/unit.gl.min.css +1 -1
- package/package.json +1 -1
- package/scss/_global.scss +3 -1
- package/scss/_guide.scss +3 -1
- package/scss/_helper.scss +2 -4
- package/scss/_reset.scss +2 -1
- package/scss/classes/_index.scss +17 -0
- package/scss/classes/_paper.scss +97 -0
- package/scss/display/_device.scss +4 -3
- package/scss/display/_display_orientation.scss +3 -5
- package/scss/display/_index.scss +13 -0
- package/scss/guides/_index.scss +13 -0
- package/scss/index.scss +11 -14
- package/scss/math/{_math_arithmetic.scss → _arithmetic.scss} +1 -1
- package/scss/math/_index.scss +13 -0
- package/scss/math/{_math_ratio.scss → _ratio.scss} +1 -1
- package/scss/math/{_math_scale.scss → _scale.scss} +1 -1
- package/scss/math/{_math_sequence.scss → _sequence.scss} +1 -1
- package/scss/mixins/_index.scss +19 -0
- package/scss/mixins/_paper.scss +35 -0
- package/scss/mixins/_ratio.scss +171 -0
- package/scss/mixins/_view.scss +79 -0
- package/scss/variables/_index.scss +24 -0
- package/scss/{_layer.scss → variables/_layer.scss} +1 -2
- package/scss/{_paper.scss → variables/_paper.scss} +3 -109
- package/scss/{_scale.scss → variables/_scale.scss} +4 -14
- package/scss/{_unit.scss → variables/_unit.scss} +3 -1
- package/scss/{_unit_conversion.scss → variables/_unit_conversion.scss} +1 -1
- package/scss/{_unit_functions.scss → variables/_unit_functions.scss} +14 -0
- package/scss/{_view.scss → variables/_view.scss} +2 -61
- package/scss/_ratio.scss +0 -97
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
|
|
21
|
+
@use "../variables" as *;
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// Usage
|
|
25
|
+
// ============================================================================
|
|
26
|
+
|
|
27
|
+
// .paper {
|
|
28
|
+
|
|
29
|
+
// // Q Series
|
|
30
|
+
// // ------------------------------------------------------------------------
|
|
31
|
+
// &.q0 { @include set_paper_size("q0"); }
|
|
32
|
+
// &.q1 { @include set_paper_size("q1"); }
|
|
33
|
+
// &.q2 { @include set_paper_size("q2"); }
|
|
34
|
+
// &.q3 { @include set_paper_size("q3"); }
|
|
35
|
+
// &.q4 { @include set_paper_size("q4"); }
|
|
36
|
+
// &.q5 { @include set_paper_size("q5"); }
|
|
37
|
+
// &.q6 { @include set_paper_size("q6"); }
|
|
38
|
+
// &.q7 { @include set_paper_size("q7"); }
|
|
39
|
+
// &.q8 { @include set_paper_size("q8"); }
|
|
40
|
+
// &.q9 { @include set_paper_size("q9"); }
|
|
41
|
+
// &.q10 { @include set_paper_size("q10"); }
|
|
42
|
+
|
|
43
|
+
// // ISO A Series
|
|
44
|
+
// // ------------------------------------------------------------------------
|
|
45
|
+
// &.iso_a0 { @include set_paper_size("iso_a0"); }
|
|
46
|
+
// &.iso_a1 { @include set_paper_size("iso_a1"); }
|
|
47
|
+
// &.iso_a2 { @include set_paper_size("iso_a2"); }
|
|
48
|
+
// &.iso_a3 { @include set_paper_size("iso_a3"); }
|
|
49
|
+
// &.iso_a4 { @include set_paper_size("iso_a4"); }
|
|
50
|
+
// &.iso_a5 { @include set_paper_size("iso_a5"); }
|
|
51
|
+
// &.iso_a6 { @include set_paper_size("iso_a6"); }
|
|
52
|
+
// &.iso_a7 { @include set_paper_size("iso_a7"); }
|
|
53
|
+
// &.iso_a8 { @include set_paper_size("iso_a8"); }
|
|
54
|
+
// &.iso_a9 { @include set_paper_size("iso_a9"); }
|
|
55
|
+
// &.iso_a10 { @include set_paper_size("iso_a10"); }
|
|
56
|
+
|
|
57
|
+
// }
|
|
58
|
+
|
|
59
|
+
// Function to calculate ISO paper sizes
|
|
60
|
+
// @function iso-paper-size($number) {
|
|
61
|
+
// $base-width: 841mm;
|
|
62
|
+
// $base-height: 1189mm;
|
|
63
|
+
|
|
64
|
+
// @for $i from 0 through $number {
|
|
65
|
+
// $base-width: $base-width / if($i > 0, 2, 1);
|
|
66
|
+
// $base-height: $base-height / if($i > 0 and $i % 2 == 0, 2, 1);
|
|
67
|
+
// }
|
|
68
|
+
|
|
69
|
+
// @return (width: $base-width, height: $base-height);
|
|
70
|
+
// }
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
// Function to calculate ISO B-series paper sizes
|
|
74
|
+
// @function iso-paper-size-b($number) {
|
|
75
|
+
// $base-width: 1000mm; // Approximate base width for B0
|
|
76
|
+
// $base-height: 1414mm; // Approximate base height for B0
|
|
77
|
+
|
|
78
|
+
// @for $i from 0 through $number {
|
|
79
|
+
// $base-width: $base-width / if($i > 0, sqrt(2), 1);
|
|
80
|
+
// $base-height: $base-height / if($i > 0 and $i % 2 == 0, sqrt(2), 1);
|
|
81
|
+
// }
|
|
82
|
+
|
|
83
|
+
// @return (width: $base-width, height: $base-height);
|
|
84
|
+
// }
|
|
85
|
+
|
|
86
|
+
// Function to calculate ISO C-series paper sizes
|
|
87
|
+
// @function iso-paper-size-c($number) {
|
|
88
|
+
// $base-width: 917mm; // Approximate base width for C0
|
|
89
|
+
// $base-height: 1297mm; // Approximate base height for C0
|
|
90
|
+
|
|
91
|
+
// @for $i from 0 through $number {
|
|
92
|
+
// $base-width: $base-width / if($i > 0, sqrt(2), 1);
|
|
93
|
+
// $base-height: $base-height / if($i > 0 and $i % 2 == 0, sqrt(2), 1);
|
|
94
|
+
// }
|
|
95
|
+
|
|
96
|
+
// @return (width: $base-width, height: $base-height);
|
|
97
|
+
// }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2024 Scape Agency BV
|
|
2
2
|
|
|
3
|
-
// Licensed under the Apache License, Version 2.
|
|
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.
|
|
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
|
|
1
|
+
// Copyright 2024 Scape Agency BV
|
|
2
2
|
|
|
3
|
-
// Licensed under the Apache License, Version 2.
|
|
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.
|
|
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
|
|
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,7 +13,6 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
/**
|
|
18
17
|
* unit.gl
|
|
19
18
|
*
|
|
@@ -30,22 +29,20 @@
|
|
|
30
29
|
|
|
31
30
|
@use "sass:math";
|
|
32
31
|
|
|
32
|
+
@forward "variables";
|
|
33
|
+
@forward "mixins";
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
33
37
|
|
|
34
|
-
@
|
|
35
|
-
@
|
|
36
|
-
@import "_layer";
|
|
38
|
+
@forward "reset";
|
|
39
|
+
@forward "global";
|
|
37
40
|
|
|
38
|
-
@import "_paper";
|
|
39
41
|
|
|
40
|
-
@import "_view";
|
|
41
42
|
|
|
42
|
-
@
|
|
43
|
-
@
|
|
44
|
-
@import "_unit";
|
|
43
|
+
@forward "helper";
|
|
44
|
+
@forward "guide";
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
@import "_ratio";
|
|
48
|
-
@import "_scale";
|
|
49
47
|
|
|
50
|
-
@
|
|
51
|
-
@import "_guide";
|
|
48
|
+
@forward "classes";
|
|
@@ -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,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
|
|
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: (
|