You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, margin-block-start is basically equivalent to margin-top except it's aware of flow direction and text direction.
There's more to these than just dimensional props, see this spec – note the TOC on the left, the new values for text-align, the new logical keyword, etc.
Main question is how to encode these props. We could spell out each property like we do for e.g. marginTop, marginBottom, etc. but then the myriad of new props would "pollute" autocomplete.
Few people use these new props (and actually test their websites to make sure they work with the different text directions), so I'm not sure if that's a good tradeoff. And in general I loathe having to define repetitive props.
Alternatively, we could make those props nested, such as margin.blockStart or borderColor.inlineEnd. We would also need to add old ones like margin.top for consistency I guess. I don't think I'm ready to completely replace the existing props like marginTop with margin.top, both options might need to co-exist for a while.
Regarding the logical keyword, I think its best to not include it for now since issue 1 on the spec clearly defines it as unstable.
I don't see the autocomplete "pollution" as a problem but rather as a feature it helps with the discoverability. But I do understand why it isn't the most good looking option.
Making the props nested could be a very elegant solution. Here is a very rough idea (does not handle things like border-block-start-width):
Activity
raquo commentedon Jul 7, 2022
Main question is how to encode these props. We could spell out each property like we do for e.g.
marginTop,marginBottom, etc. but then the myriad of new props would "pollute" autocomplete.Few people use these new props (and actually test their websites to make sure they work with the different text directions), so I'm not sure if that's a good tradeoff. And in general I loathe having to define repetitive props.
Alternatively, we could make those props nested, such as
margin.blockStartorborderColor.inlineEnd. We would also need to add old ones likemargin.topfor consistency I guess. I don't think I'm ready to completely replace the existing props likemarginTopwithmargin.top, both options might need to co-exist for a while.Lasering commentedon Jul 8, 2022
Regarding the
logicalkeyword, I think its best to not include it for now since issue 1 on the spec clearly defines it as unstable.I don't see the autocomplete "pollution" as a problem but rather as a feature it helps with the discoverability. But I do understand why it isn't the most good looking option.
Making the props nested could be a very elegant solution. Here is a very rough idea (does not handle things like
border-block-start-width):Even the documentation could be easily done via interpolation.