Skip to content

Commit 31299cc

Browse files
ebraminioKrinkle
authored andcommitted
docs: Add a note about CSS Logical 1
Change-Id: I827f90b451cecbb82a777d52f90ba3a9c44b65d9
1 parent c8ed317 commit 31299cc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,24 @@ If a rule is not meant to be flipped by CSSJanus, use a `/* @noflip */` comment
4949
}
5050
```
5151

52+
## CSS Logical
53+
54+
We encourage and recommend use of
55+
[CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values)
56+
for the subset of CSS features where a native
57+
direction-aware version of a CSS property exists
58+
(be sure to check [browser support](https://caniuse.com/)
59+
for specific properties). You can, for example, set
60+
properties like `margin-inline-start` instead of
61+
`margin-left`, which the browser flips based on content
62+
direction, and work seamlessly alongside other CSS
63+
properties that CSSJanus flips instead.
64+
65+
Note that CSS logical properties flip based on nearest
66+
content direction and content language, whereas CSSJanus
67+
is generally configured to flip by user language and
68+
UI direction.
69+
5270
## Integrations
5371

5472
* **[css](https://www.npmjs.com/package/css)** parser: [rtl-converter](https://github.com/HosseinAlipour/rtl-converter).

0 commit comments

Comments
 (0)