CSS has historically revolved around
Those make sense
in a world where
what you see is what you get –
but that’s fundamentally
not how the web works.
new layout methods
like flexbox and grid
have started to introduce
‘flow-relative’ or ‘logical’ directions:
That allows more meaningful and resilient design in the face of translation – both for multi-lingual sites, and for a web that supports more and more automatic translation.
It’s not bad to use the physical properties sometimes, when they best express the design intent, but they shouldn’t be encouraged as the default choice.
So the goal in my mind is that it should be simple to write an entire site without reference to physical coordinates. And doing that should be encouraged by the language.
we currently have a
shorthand that defines physical margin properties.
We could add a
but it feels like
a second-class citizen of the language.
If the physical property feels like the ‘default’,
then the language is encouraging
authors to stick with physical dimensions.
Yesterday, Jeremy Keith wrote a great article – Let’s get logical – about his attempts to refactor a site using only flow-relative properties, and the limitations he ran intro with existing CSS. It’s a great run down of what works already, and what’s still missing.
We’re not there yet. So how do we get there?
Well, I don’t know for sure – but articles like this are very helpful as we try to work it out!
We’re discussing all of that today at W3C’s annual TPAC conference, in a joint meeting between the CSS Working Group and the Internationalization Working Group. Maybe we’ll have something new to report later today?
If you have ideas, or additional issues that we should have in mind – let us know!