Build a switch for logical properties #14852
ngdangtu-vn
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I have replaced all the static ones with logical properties in personal projects. And I see no reasons to keep static properties in my website that much longer. Since CSS logical properties has reached to mature state but TW hasn't had a proper support for it, we have fews but not enough, I suggest we made a switch (a TW option) to allow us replace all the static direction properties to corresponding logical properties. Here is a few examples:
top-*
:top
→inset-block-start
mt-*
:margin-top
→margin-block-start
pr-*
:padding-right
→padding-block-end
px-*
: ... →padding-inline
w-*
:width
→inline-size
Here is my config idea:
The
LogicialPropertyOption
allow fine-grain control on which property you want to replace logical properties with.I've done a search for similar discussion and found one. However I think my idea is different approach. So I think it suits for a separated thread.
Beta Was this translation helpful? Give feedback.
All reactions