Skip to content

Commit f8b6023

Browse files
ebraminioKrinkle
authored andcommitted
docs: Add a note about CSS Logical 1
Backports I827f90b451cecbb82a777d52f90ba3a9c44b65d9 to the PHP side. Change-Id: Icae21fafc561aada6f230833c06f15a7c775cff8
1 parent 32fb9bb commit f8b6023

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ If a rule is not meant to be flipped by CSSJanus, use a `/* @noflip */` comment
3838
}
3939
```
4040

41+
## CSS Logical Properties
42+
43+
We encourage and recommend use of [CSS logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values) for the subset of CSS features where a native direction-aware version of a CSS property exists (be sure to check [browser support](https://caniuse.com/)
44+
for specific properties).
45+
You can, for example, set properties like `margin-inline-start` instead of `margin-left`, which the browser flips based on content direction, and work seamlessly alongside other CSS properties that CSSJanus flips instead.
46+
47+
Note that CSS logical properties flip based on nearest content direction and content language, whereas CSSJanus is generally configured to flip by user language and UI direction.
48+
4149
## Port
4250

4351
This is a PHP port of the Node.js implementation of CSSJanus. Feature requests and bugs related

0 commit comments

Comments
 (0)