@swiftwc/ui 0.0.0-dev.97 → 0.0.0-dev.98

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftwc/ui",
3
- "version": "0.0.0-dev.97",
3
+ "version": "0.0.0-dev.98",
4
4
  "description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,9 +16,15 @@ $self-map: (
16
16
  max-inline-size: 100%;
17
17
  }
18
18
  @for $i from 0 through 100 {
19
+ :where([frame\:width='#{$i}']) {
20
+ max-inline-size: #{$i}rem;
21
+ }
19
22
  :where([frame\:max-width='#{$i}']) {
20
23
  max-inline-size: #{$i}rem;
21
24
  }
25
+ :where([frame\:width='#{$i}cqi']) {
26
+ max-inline-size: #{$i}cqi;
27
+ }
22
28
  :where([frame\:max-width='#{$i}cqi']) {
23
29
  max-inline-size: #{$i}cqi;
24
30
  }
@@ -52,53 +58,6 @@ $self-map: (
52
58
  }
53
59
  }
54
60
 
55
- // :where([frame\:alignment='top']) {
56
- // align-self: start;
57
- // }
58
- // :where([frame\:alignment='leading']) {
59
- // justify-self: start;
60
- // }
61
-
62
- // :where([frame-width='infinity']) {
63
- // place-items: stretch; //justify-self: stretch;
64
- // }
65
- // :where([frame-alignment='leading']) {
66
- // align-self: start;
67
- // }
68
- // :where([frame-alignment='center']) {
69
- // align-self: center;
70
- // }
71
- // :where([frame-alignment='trailing']) {
72
- // align-self: end;
73
- // }
74
- // :where([alignment='start']) {
75
- // place-items: start;
76
- // }
77
- // :where([alignment='fill']) {
78
- // place-items: stretch;
79
- // }
80
- // :where([content='start']) {
81
- // place-content: start;
82
- // }
83
- // :where([justify-content='start']) {
84
- // justify-content: start;
85
- // }
86
- // :where([justify-content='start']) {
87
- // justify-content: start;
88
- // }
89
- // :where([spacer='top']) {
90
- // margin-top: auto;
91
- // }
92
- // :where([distribution='start']) {
93
- // place-content: start;
94
- // }
95
- // :where([distribution='space-between']) {
96
- // place-content: space-between;
97
- // }
98
- // :where(spacer) {
99
- // margin: auto;
100
- // }
101
-
102
61
  @media (prefers-reduced-motion: no-preference) {
103
62
  :where([slow]) {
104
63
  visibility: visible;
@@ -124,3 +83,21 @@ $self-map: (
124
83
  }
125
84
  }
126
85
  }
86
+
87
+ @layer #{vars.$components-layer} {
88
+ // readable 2/2
89
+ v-stack {
90
+ :where(&[readable]) {
91
+ inline-size: 100%; //->[frame\:width='infinity']
92
+ justify-self: center; //->[frame\:alignment='center'];
93
+ }
94
+ @for $i from 0 through 100 {
95
+ :where(&[readable='#{$i}']) {
96
+ max-inline-size: #{$i}rem; //->[frame:max-width='{length}'`]
97
+ }
98
+ :where(&[readable='#{$i}cqi']) {
99
+ max-inline-size: #{$i}cqi; //->[frame:max-width='{length}'`]
100
+ }
101
+ }
102
+ }
103
+ }
@@ -41,7 +41,7 @@
41
41
  h-flex-stack {
42
42
  // block dir for items+content
43
43
  @each $k, $declarations in maps.$block-map {
44
- &[distribution='#{$k}'] {
44
+ :where(&[distribution='#{$k}']) {
45
45
  @each $decl in $declarations {
46
46
  #{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')}; //#{list.nth($decl, 2)};
47
47
  }
@@ -50,7 +50,7 @@
50
50
 
51
51
  // inline dir for items+content
52
52
  @each $k, $declarations in maps.$inline-map {
53
- &[alignment='#{$k}'] {
53
+ :where(&[alignment='#{$k}']) {
54
54
  @each $decl in $declarations {
55
55
  #{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')}; //#{list.nth($decl, 2)};
56
56
  }
@@ -59,7 +59,7 @@
59
59
 
60
60
  // placement="leading fill" -> shortcut for distribution="leading" alignment="fill"
61
61
  @each $k, $declarations in maps.$block-placement-map {
62
- &[placement='#{$k}'] {
62
+ :where(&[placement='#{$k}']) {
63
63
  @each $decl in $declarations {
64
64
  #{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')};
65
65
  }
@@ -99,3 +99,14 @@
99
99
  }
100
100
  }
101
101
  }
102
+
103
+ @layer #{vars.$components-layer} {
104
+ // readable 1/2
105
+ v-stack {
106
+ :where(&[readable]) {
107
+ @each $decl in map.get(maps.$block-placement-map, 'leading fill') {
108
+ #{list.nth($decl, 1)}: #{list.join(list.nth($decl, 2), ' ')}; //->[placement='leading fill']->[distribution='leading'][alignment='fill']
109
+ }
110
+ }
111
+ }
112
+ }