unit.gl 0.0.35 → 0.0.38

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 (72) hide show
  1. package/LICENSE +21 -201
  2. package/README.md +20 -70
  3. package/css/unit.gl.css +28 -65
  4. package/css/unit.gl.min.css +1 -1
  5. package/package.json +11 -5
  6. package/scss/_global.scss +5 -23
  7. package/scss/_reset.scss +13 -15
  8. package/scss/classes/_guide.scss +126 -0
  9. package/scss/classes/_index.scss +25 -11
  10. package/scss/classes/_ratio.scss +30 -0
  11. package/scss/dev/_banner.scss +30 -1
  12. package/scss/dev/_index.scss +0 -0
  13. package/scss/functions/_color.scss +40 -0
  14. package/scss/functions/_index.scss +39 -16
  15. package/scss/functions/_layer.scss +48 -0
  16. package/scss/functions/_ratio.scss +58 -157
  17. package/scss/functions/_scale.scss +55 -49
  18. package/scss/functions/_sequence.scss +154 -126
  19. package/scss/functions/_view.scss +40 -0
  20. package/scss/functions/math/_arithmetic.scss +102 -0
  21. package/scss/functions/math/_index.scss +30 -0
  22. package/scss/functions/unit/_index.scss +30 -0
  23. package/scss/functions/unit/_unit_conversion.scss +94 -0
  24. package/scss/functions/{_unit_functions.scss → unit/_unit_functions.scss} +70 -36
  25. package/scss/index.scss +2 -16
  26. package/scss/maps/_color.scss +43 -0
  27. package/scss/maps/_index.scss +1 -0
  28. package/scss/mixins/_device.scss +63 -25
  29. package/scss/mixins/_display.scss +106 -44
  30. package/scss/mixins/_guide.scss +191 -158
  31. package/scss/mixins/_helper.scss +287 -52
  32. package/scss/mixins/_index.scss +50 -17
  33. package/scss/mixins/_paper.scss +38 -17
  34. package/scss/mixins/_ratio.scss +30 -13
  35. package/scss/mixins/_unit.scss +94 -0
  36. package/scss/mixins/_view.scss +123 -44
  37. package/scss/tags/_index.scss +30 -0
  38. package/scss/tags/_unit.scss +40 -0
  39. package/scss/utilities/_guides.scss +103 -0
  40. package/scss/utilities/_index.scss +6 -0
  41. package/scss/variables/_color.scss +83 -0
  42. package/scss/variables/_device.scss +140 -50
  43. package/scss/variables/_index.scss +84 -16
  44. package/scss/variables/_layer.scss +148 -51
  45. package/scss/variables/_paper.scss +243 -17
  46. package/scss/variables/_ratio.scss +224 -0
  47. package/scss/variables/_scale.scss +230 -104
  48. package/scss/variables/_unit.scss +76 -72
  49. package/scss/variables/_view.scss +135 -39
  50. package/ts/AspectRatio.ts +29 -0
  51. package/ts/Border.ts +29 -0
  52. package/ts/BoxModel.ts +40 -0
  53. package/ts/FlexContainer.ts +48 -0
  54. package/ts/Grid.ts +21 -0
  55. package/ts/GridContainer.ts +33 -0
  56. package/ts/Layout.ts +34 -0
  57. package/ts/Position.ts +28 -0
  58. package/ts/Rectangle.ts +28 -0
  59. package/ts/ResponsiveImage.ts +28 -0
  60. package/ts/ResponsiveScale.ts +21 -0
  61. package/ts/Size.ts +32 -0
  62. package/ts/Spacing.ts +68 -0
  63. package/ts/Transform.ts +38 -0
  64. package/ts/Typography.ts +41 -0
  65. package/ts/Unit.ts +57 -0
  66. package/ts/Viewport.ts +24 -0
  67. package/js/index.d.ts +0 -1
  68. package/js/index.js +0 -3
  69. package/js/unit.gl.min.js +0 -1
  70. package/scss/classes/_paper.scss +0 -97
  71. package/scss/functions/_arithmetic.scss +0 -64
  72. package/scss/functions/_unit_conversion.scss +0 -77
package/LICENSE CHANGED
@@ -1,201 +1,21 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Scape Agency
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,58 +1,33 @@
1
1
  <div align="right">
2
2
 
3
- [![GitHub License](https://img.shields.io/github/license/scape-agency/unit.gl?style=flat-square&logo=readthedocs&logoColor=FFFFFF&label=&labelColor=%23041B26&color=%23041B26&link=LICENSE)](https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
4
- [![devContainer](https://img.shields.io/badge/Container-Remote?style=flat-square&logo=visualstudiocode&logoColor=%23FFFFFF&label=Remote&labelColor=%23041B26&color=%23041B26)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/scape-agency/unit.gl)
3
+ [![GitHub License](https://img.shields.io/github/license/stylescape/unit.gl?style=flat-square&logo=readthedocs&logoColor=FFFFFF&label=&labelColor=%23041B26&color=%23041B26&link=LICENSE)](https://github.com/stylescape/unit.gl/blob/main/LICENSE)
4
+ [![devContainer](https://img.shields.io/badge/Container-Remote?style=flat-square&logo=visualstudiocode&logoColor=%23FFFFFF&label=Remote&labelColor=%23041B26&color=%23041B26)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/stylescape/unit.gl)
5
5
 
6
6
  </div>
7
7
 
8
- ---
9
-
10
- <div>
11
- <img align="right" src="https://raw.githubusercontent.com/scape-agency/brand/master/src/logo/unit.gl.png" width="96" alt="unit.gl logo">
12
- <h1 align="left">unit.gl</h1>
13
- <h3 align="left">Stylescape Layout Engine</h3>
14
- </div>
15
-
16
- ---
17
-
18
- <img align="right" width="50%" src="https://raw.githubusercontent.com/scape-agency/unit.gl/main/res/unit.gl.png" alt="unit.gl cover">
19
-
20
- ### Contents
21
-
22
- - [Introduction](#introduction)
23
- - [Colophon](#colophon)
24
-
25
- <br clear="both"/>
8
+ <p align="center">
9
+ <img src="https://raw.githubusercontent.com/stylescape/brand/master/src/logo/logo-transparant.png" width="20%" height="20%" alt="Stylescape Logo">
10
+ </p>
11
+ <h1 align="center" style='border-bottom: none;'>unit.gl</h1>
12
+ <h3 align="center">Dynamic Layout Engine</h3>
26
13
 
27
14
  ---
28
15
 
29
16
  <div align="right">
30
17
 
31
- [![Report a Bug](https://img.shields.io/badge/Report%20a%20Bug-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/scape-agency/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=bug_report.yml)
32
- [![Request a Feature](https://img.shields.io/badge/Request%20a%20Feature-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/scape-agency/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=feature_request.yml)
33
- [![Ask a Question](https://img.shields.io/badge/Ask%20a%20Question-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/scape-agency/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=question.yml)
34
- [![Make a Suggestion](https://img.shields.io/badge/Make%20a%20Suggestion-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/scape-agency/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=suggestion.yml)
35
- [![Start a Discussion](https://img.shields.io/badge/Start%20a%20Discussion-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/scape-agency/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=discussion.yml)
18
+ [![Report a Bug](https://img.shields.io/badge/Report%20a%20Bug-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/stylescape/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=bug_report.yml)
19
+ [![Request a Feature](https://img.shields.io/badge/Request%20a%20Feature-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/stylescape/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=feature_request.yml)
20
+ [![Ask a Question](https://img.shields.io/badge/Ask%20a%20Question-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/stylescape/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=question.yml)
21
+ [![Make a Suggestion](https://img.shields.io/badge/Make%20a%20Suggestion-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/stylescape/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=suggestion.yml)
22
+ [![Start a Discussion](https://img.shields.io/badge/Start%20a%20Discussion-GitHub?style=flat-square&&logoColor=%23FFFFFF&color=%23E1E4E5)](https://github.com/stylescape/unit.gl/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&projects=&template=discussion.yml)
36
23
 
37
24
  </div>
38
25
 
39
- **Stylescape Layout Engine.**
40
26
 
41
27
  ## Introduction
42
28
 
43
29
  `unit.gl` is a comprehensive design toolkit focused on fluid typography, responsive design, and advanced SCSS functions. It's crafted to empower designers and developers to create harmonious, scalable, and accessible web experiences efficiently.
44
30
 
45
- ## Features
46
-
47
- - **Fluid Typography**: Utilizes the Kyū measurement system, allowing seamless scaling of text across different devices.
48
- - **Modular Scale**: Provides functions for generating sizes (font-size, spacing) based on various musical and mathematical ratios.
49
- - **Responsive Helpers**: Includes mixins for orientation and device-specific media queries, enabling designs that adapt to various screen sizes and resolutions.
50
- - **Advanced SCSS Functions**: Contains a suite of functions for unit conversions, arithmetic operations, and generating sequences like Fibonacci, Lucas, and more.
51
- - **Accessibility Considerations**: Ensures typography adheres to accessibility standards like WCAG.
52
- - **Dynamic Scaling**: Implements CSS clamp for more dynamic scaling across a range of screen sizes.
53
- - **Lucas and Fibonacci Series**: Functions to generate numbers from these famous sequences for use in design calculations.
54
- - **Guides and Grids**: Mixins for creating baseline grids and guide overlays for design alignment.
55
-
56
31
  ## Installation
57
32
 
58
33
  ### HTML Script Tag
@@ -67,36 +42,6 @@
67
42
  npm i unit.gl
68
43
  ```
69
44
 
70
- ## Links
71
-
72
- - [Website](https://www.unit.gl)
73
- - [NPM](https://www.npmjs.com/package/unit.gl)
74
-
75
-
76
- ## Unit System
77
-
78
- ### Digital Size Conversions
79
-
80
-
81
- ### Physical SizeConversions
82
-
83
-
84
- ### Pixel Density
85
-
86
- | Density Bucket | Screen Density | Physical Size | Pixel Size | |
87
- | :---------------- | ----------------: | ----------------: | ----------------: | ----------------: |
88
- | `ldpi` | 120 *dpi* | 0.5 x 0.5 *in* | 60 x 60 *px* | 0.5 in x 120 dpi |
89
- | `mdpi` | 160 *dpi* | 0.5 x 0.5 *in* | 80 x 80 *px* | 0.5 in x 160 dpi |
90
- | `hdpi` | 240 *dpi* | 0.5 x 0.5 *in* | 120 x 120 *px* | 0.5 in x 240 dpi |
91
- | `xhdpi` | 320 *dpi* | 0.5 x 0.5 *in* | 160 x 160 *px* | 0.5 in x 320 dpi |
92
- | `xxhdpi` | 480 *dpi* | 0.5 x 0.5 *in* | 240 x 240 *px* | 0.5 in x 480 dpi |
93
- | `xxxhdpi` | 640 *dpi* | 0.5 x 0.5 *in* | 320 x 320 *px* | 0.5 in x 640 dpi |
94
-
95
- More information:
96
-
97
- - [Understanding Density Independence In Android](https://blog.mindorks.com/understanding-density-independent-pixel-sp-dp-dip-in-android/)
98
- - [Material Design | Pixel density](https://m2.material.io/design/layout/pixel-density.html)
99
-
100
45
  ---
101
46
 
102
47
  ## Colophon
@@ -105,12 +50,17 @@ More information:
105
50
 
106
51
  **unit.gl** is an open-source project by **[Scape Agency](https://www.scape.agency "Scape Agency website")**.
107
52
 
108
- ##### Scape Agency
53
+ #### Scape Agency
109
54
 
110
55
  Scape Agency is a spatial innovation collective that dreams, discovers and designs the everyday of tomorrow. We blend design thinking with emerging technologies to create a brighter perspective for people and planet. Our products and services naturalise technology in liveable and sustainable –scapes that spark the imagination and inspire future generations.
111
56
 
112
57
  - website: [scape.agency](https://www.scape.agency "Scape Agency website")
113
- - github: [github.com/scape-agency](https://github.com/scape-agency "Scape Agency GitHub")
58
+ - github: [github.com/stylescape](https://github.com/stylescape "Scape Agency GitHub")
59
+
60
+ #### Links
61
+
62
+ - [Website](https://www.unit.gl)
63
+ - [NPM](https://www.npmjs.com/package/unit.gl)
114
64
 
115
65
  ### Development Resources
116
66
 
@@ -131,7 +81,7 @@ Except as otherwise noted, the content in this repository is licensed under the
131
81
  [Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/), and
132
82
  code samples are licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).
133
83
 
134
- Also see [LICENSE](https://github.com/scape-agency/community/blob/master/src/LICENSE) and [LICENSE-CODE](https://github.com/scape-agency/community/blob/master/src/LICENSE-CODE).
84
+ Also see [LICENSE](https://github.com/stylescape/community/blob/master/src/LICENSE) and [LICENSE-CODE](https://github.com/stylescape/community/blob/master/src/LICENSE-CODE).
135
85
 
136
86
  #### Disclaimer
137
87
 
package/css/unit.gl.css CHANGED
@@ -122,24 +122,28 @@ var,
122
122
  video,
123
123
  wbr {
124
124
  margin: 0;
125
- -webkit-margin-before: 0;
126
- margin-block-start: 0;
127
- -webkit-margin-after: 0;
128
- margin-block-end: 0;
129
- -webkit-margin-start: 0;
130
- margin-inline-start: 0;
131
- -webkit-margin-end: 0;
132
- margin-inline-end: 0;
125
+ margin-block-start: 0;
126
+ margin-block-end: 0;
127
+ margin-inline-start: 0;
128
+ margin-inline-end: 0;
133
129
  padding: 0;
130
+ border: 0;
131
+ font-size: 100%;
132
+ font: inherit;
133
+ vertical-align: baseline;
134
+ }
135
+
136
+ article, aside, details, figcaption, figure,
137
+ footer, header, hgroup, menu, nav, section, main {
138
+ display: block;
134
139
  }
135
140
 
136
141
  html {
137
142
  box-sizing: border-box;
138
- -webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS */
143
+ -webkit-text-size-adjust: 100%;
139
144
  word-break: normal;
140
145
  -moz-tab-size: 4;
141
- -o-tab-size: 4;
142
- tab-size: 4;
146
+ tab-size: 4;
143
147
  height: 100%;
144
148
  }
145
149
 
@@ -159,39 +163,21 @@ html, body {
159
163
  *,
160
164
  ::before,
161
165
  ::after {
162
- background-repeat: no-repeat; /* Set `background-repeat: no-repeat` to all elements and pseudo elements */
166
+ background-repeat: no-repeat;
163
167
  box-sizing: inherit;
164
168
  }
165
169
 
166
170
  ::before,
167
171
  ::after {
168
- text-decoration: inherit; /* Inherit text-decoration and vertical align to ::before and ::after pseudo elements */
172
+ text-decoration: inherit;
169
173
  vertical-align: inherit;
170
174
  }
171
175
 
172
176
  * {
173
- padding: 0; /* Reset `padding` and `margin` of all elements */
177
+ padding: 0;
174
178
  margin: 0;
175
179
  }
176
180
 
177
- :root {
178
- --q: $q;
179
- }
180
-
181
- html {
182
- font-size: 12px;
183
- }
184
- @media screen and (min-width: 320px) {
185
- html {
186
- font-size: calc(12px + 12 * (100vw - 320px) / 1120);
187
- }
188
- }
189
- @media screen and (min-width: 1440px) {
190
- html {
191
- font-size: 24px;
192
- }
193
- }
194
-
195
181
  .ratio_1x1 {
196
182
  aspect-ratio: 1;
197
183
  width: 100%;
@@ -400,40 +386,17 @@ html {
400
386
  display: inline-block;
401
387
  }
402
388
 
403
- .guide {
404
- position: absolute;
405
- top: 0;
406
- left: 0;
407
- width: 100%;
408
- height: 100%;
409
- margin: 0;
410
- pointer-events: none;
411
- z-index: 9999;
389
+ html {
390
+ font-size: 12px;
412
391
  }
413
-
414
- .guide_graph {
415
- position: absolute;
416
- top: 0;
417
- left: 0;
418
- width: 100%;
419
- height: 100%;
420
- margin: 0;
421
- pointer-events: none;
422
- z-index: 9999;
423
- background-size: 0.25rem 0.25rem;
424
- 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%);
392
+ @media screen and (min-width: 320px) {
393
+ html {
394
+ font-size: calc(12px + 12 * (100vw - 320px) / 1120);
395
+ }
425
396
  }
426
-
427
- .guide_baseline {
428
- position: absolute;
429
- top: 0;
430
- left: 0;
431
- width: 100%;
432
- height: 100%;
433
- margin: 0;
434
- pointer-events: none;
435
- z-index: 9999;
436
- background-size: 100% 1.5rem;
437
- background-image: repeating-linear-gradient(to bottom, cyan 0 1px, transparent 1px 100%);
397
+ @media screen and (min-width: 1440px) {
398
+ html {
399
+ font-size: 24px;
400
+ }
438
401
  }
439
402
  /*# sourceMappingURL=to.css.map */
@@ -1,2 +1,2 @@
1
- *,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}:root{--q:$q}html{font-size:12px}@media screen and (min-width:320px){html{font-size:calc(8.57143px + 1.07143vw)}}@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}
1
+ *,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{border:0;font-size:100%;font:inherit;margin:0;margin-block-end:0;margin-block-start:0;margin-inline-end:0;margin-inline-start:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}html{box-sizing:border-box;-webkit-text-size-adjust:100%;height:100%;-moz-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}.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%}html{font-size:12px}@media screen and (min-width:320px){html{font-size:calc(8.57143px + 1.07143vw)}}@media screen and (min-width:1440px){html{font-size:24px}}
2
2
  /*# sourceMappingURL=to.css.map */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unit.gl",
3
- "version": "0.0.35",
4
- "description": "Layout Engine.",
3
+ "version": "0.0.38",
4
+ "description": "Dynamic Layout Engine.",
5
5
  "keywords": [
6
6
  "unit.gl",
7
7
  "unit",
@@ -17,7 +17,7 @@
17
17
  "framework",
18
18
  "web"
19
19
  ],
20
- "license": "Apache-2.0",
20
+ "license": "MIT",
21
21
  "homepage": "https://www.unit.gl/",
22
22
  "funding": [
23
23
  {
@@ -50,12 +50,18 @@
50
50
  "ts/**/*.ts",
51
51
  "!.DS_Store"
52
52
  ],
53
- "author": "Lars van Vianen <lars@vianen.com> (https://vianen.com)",
53
+ "author": "Lars van Vianen <lars@vianen.com> (https://www.vianen.com)",
54
54
  "contributors": [
55
55
  "Scape Agency <info@scape.agency>"
56
56
  ],
57
57
  "repository": {
58
58
  "type": "git",
59
- "url": "git+https://github.com/scape-agency/unit.gl.git"
59
+ "url": "git+https://github.com/stylescape/unit.gl.git"
60
+ },
61
+ "exports": {
62
+ ".": {
63
+ "sass": "./scss/index.scss",
64
+ "typescript": "./ts/index.scss"
65
+ }
60
66
  }
61
67
  }
package/scss/_global.scss CHANGED
@@ -1,24 +1,9 @@
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
1
  // Base | Body
17
2
  // ============================================================================
18
3
 
19
4
  html {
20
5
  box-sizing: border-box;
21
- -webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS */
6
+ -webkit-text-size-adjust: 100%; // Prevent adjustments of font size after orientation changes in iOS
22
7
  word-break: normal;
23
8
  -moz-tab-size: 4;
24
9
  tab-size: 4;
@@ -43,18 +28,18 @@ html, body {
43
28
  *,
44
29
  ::before,
45
30
  ::after {
46
- background-repeat: no-repeat; /* Set `background-repeat: no-repeat` to all elements and pseudo elements */
31
+ background-repeat: no-repeat; // Set `background-repeat: no-repeat` to all elements and pseudo elements
47
32
  box-sizing: inherit;
48
33
  }
49
34
 
50
35
  ::before,
51
36
  ::after {
52
- text-decoration: inherit; /* Inherit text-decoration and vertical align to ::before and ::after pseudo elements */
37
+ text-decoration: inherit; // Inherit text-decoration and vertical align to ::before and ::after pseudo elements
53
38
  vertical-align: inherit;
54
39
  }
55
40
 
56
41
  * {
57
- padding: 0; /* Reset `padding` and `margin` of all elements */
42
+ padding: 0; // Reset `padding` and `margin` of all elements
58
43
  margin: 0;
59
44
  }
60
45
 
@@ -123,7 +108,4 @@ html, body {
123
108
 
124
109
  // // -webkit-font-smoothing: antialiased;
125
110
  // // -moz-osx-font-smoothing: grayscale;
126
- // }
127
-
128
-
129
-
111
+ // }