@guildofgleks/ui 21.4.4 → 21.5.0

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.
@@ -1,3 +1,30 @@
1
+ /*
2
+ * Direction primitives, for the handful of properties CSS gives no logical form of:
3
+ * `transform-origin`, `translate`, `transform`. Everything else uses real logical
4
+ * properties (`inset-inline-start`, `padding-inline-end`, `text-align: start`, …) and needs
5
+ * none of this.
6
+ *
7
+ * --gog-inline-start-side / --gog-inline-end-side `left`/`right` keywords, swapped in RTL.
8
+ * For `transform-origin`.
9
+ * --gog-direction-sign `1` / `-1`. Multiply the X part of a
10
+ * translate by it when the element is
11
+ * placed with `inset-inline-start`.
12
+ *
13
+ * Declared on `:root` and flipped by `[dir='rtl']`, so a subtree can be RTL on its own — an
14
+ * RTL panel inside an LTR page follows the nearest `dir`, like every other RTL behaviour.
15
+ */
16
+ :root {
17
+ --gog-inline-start-side: left;
18
+ --gog-inline-end-side: right;
19
+ --gog-direction-sign: 1;
20
+ }
21
+
22
+ [dir='rtl'] {
23
+ --gog-inline-start-side: right;
24
+ --gog-inline-end-side: left;
25
+ --gog-direction-sign: -1;
26
+ }
27
+
1
28
  .gog-inline-center {
2
29
  display: inline-flex;
3
30
  align-items: center;