This list is based on the MDN properties reference, and the index of CSS properties.
I have attempted to capture
all the places where axis or side
is implied by the order of values –
which includes
(but is not limited to)
shorthand properties.
For example,
background-position
is a shorthand
for background-position-x
and background-position-y
–
but object-position
uses the same syntax
without having individual longhand sub-properties.
This is not meant to be a prescriptive list of which properties should provide logical alternatives, but a descriptive list of what properties could be toggled from one syntax to another.
Apart from properties,
all <basic-shape>
functions,
transform functions,
and gradient functions currently use physical syntax –
and there have been various requests for logical alternatives.
It’s not clear to me on first-glance
if a logical/physical toggle could (or should)
change how those functions are parsed.
As a side-note, I also captured where we have physical keywords without logical alternatives, although that’s clearly tangential to the syntax-toggle issue, since they are explicit to an axis or side. Still, they seem relevant to a larger question of providing logical alternatives wherever it is useful.
I think the next step is to sort these into groups by shared syntax, and describe how a toggle (either local or global) would apply to each.
You can support this effort or read more about it.
Multi-value properties ¶
These accept multiple dimensions in a single syntax, but don’t have associated sub-properties for the dimensions involved. Ideally, a global toggle would apply here.
aspect-ratio
physical (x/y)box-shadow
physical (x/y)text-shadow
physical (x/y)background
… (*-position
is listed with shorthands)background-size
physical (x/y)background-repeat
physical (x/y) and keywords
border-image
…border-image-outset
physical (trbl)border-image-repeat
physical (x/y)border-image-slice
physical (trbl)border-image-width
physical (trbl)
mask
…mask-position
physical (x/y) with offset keywordsmask-repeat
physical (x/y) and keywordsmask-position
physical (x/y)
mask-border
…mask-border-outset
physical (trbl)mask-border-repeat
physical (x/y)mask-border-slice
physical (trbl)mask-border-width
physical (trbl)
object-position
physical (x/y) with offset keywordsoffset-position
physical (x/y) with offset keywordsperspective-origin
physical (x/y) with offset keywordstransform
… (see related functions as well)transform-origin
physical (x/y) with offset keywordsrotate
physical (x/y/z)scale
physical (x/y/z)translate
physical (x/y/z)
No change needed…
border-spacing
logical (columns & rows)column-width
& proposedcolumn-height
are flow-relativeview-timeline-inset
is controlled byview-timeline-axis
Shorthand properties ¶
These shorthands accept dimensions, which can be set individually using sub-properties. Some of them have logical as well as physical long-hand properties available, while some are missing either the physical or logical alternative.
background-position
(*-x
&*-y
) with offset keywords- missing:
*-inline
&*-block
(ED level 4, unpublished)
- missing:
size
(width
&height
)- available:
inline-size
&block-size
- available:
border
…border-width
(border-<trbl>-width
)- available:
border-<axis>-<side>-width
- available:
border-style
(border-<trbl>-style
)- available:
border-<axis>-<side>-style
- available:
border-color
(border-<trbl>-color
)- available:
border-<axis>-<side>-color
- available:
border-radius
(border-<trbl>-radius
)- available:
border-<block>-<inline>-color
- available:
border-image
(see sub-properties above)- missing: logical
-outset
,-repeat
,-slice
, &-width
- missing: logical
inset
(top
,right
,bottom
, &left
)- available:
inset-<axis>-<side>
- available:
contain-intrinsic-size
(contain-intrinsic-width
&*-height
)- available:
contain-intrinsic-<axis>-size
- available:
margin
(margin-<trbl>
)- available:
margin-<axis>-<side>
- available:
scroll-margin
(scroll-margin-<trbl>
)- available:
scroll-margin-<axis>-<side>
- available:
padding
(padding-<trbl>
)- available:
padding-<axis>-<side>
- available:
scroll-padding
(scroll-padding-<trbl>
)- available:
scroll-padding-<axis>-<side>
- available:
mask-border
(see sub-properties above)- missing: logical
-outset
,-repeat
,-slice
, &-width
- missing: logical
overflow
(overflow-x
&overflow-y
)- available:
overflow-<axis>
- available:
overflow-behavior
(*-x
&*-y
)- available:
overflow-behavior-<axis>
- available:
No change needed…
border
defines all sides equallyoutline
/outline-width
defines all sides equallyoverflow-clip-margin
defines all sides equallycolumns
already flow-relativegap
already flow-relativeanimation-range
controlled by*-timeline-axis
Keywords ¶
Since keywords clearly establish physical/logical directions, they would not be impacted by a global ‘switch’ – but it’s still useful to know where logical functionality might be missing.
background-repeat
hasrepeat-x
&repeat-y
keywords- missing
repeat-inline
&repeat-block
- missing
mask-repeat
hasrepeat-x
&repeat-y
keywords- missing
repeat-inline
&repeat-block
- missing
Properties including
background-position
, mask-position
, object-position
,
offset-position
, fill-position
, and stroke-position
all use the
<position>
syntax
with optional offset keywords.
That allows for positioning relative to
either a physical or logical edge
without any toggle on the property parsing itself.
No change needed…
caption-side
(top
&bottom
) are flow-relative, along withinline-start
andinline-end
alternatives toleft
andright
clear
has both logical & physical keywordsfloat
has both logical & physical keywords (including page-floats)flex-*
&grid-*
already flow-relativemargin-trim
already flow-relativescroll-snap-align
already flow-relativescroll-snap-type
has both logical & physical keywordsscroll-timeline-axis
has both logical & physical keywordsplace-*
and sub-properties, already flow-relativeposition-area
already flow-relativeresize
has both logical & physical keywordstext-align
has both logical & physical keywordstext-align-last
has both logical & physical keywordsazimuth
logical dimensions have no meaning here
Functions ¶
- All
<basic-shape>
functions use physical dimensions- Impacts
clip-path
,shape-outside
,offset-path
- Deprecated
clip
(forrect()
only) - Never implemented
shape-inside
- Impacts
rotate()
,translate()
, andscale()
- Impacts
transform
- Impacts
- various
gradient()
functions- Impacts all image properties
SVG ¶
Most SVG-related properties
such as cx
and cy
only provide physical syntax.
However, the text-anchor
property
only has start
and end
values,
with no physical variant.
We could consider adding physical keywords
for text-anchor
,
but I don’t see any need for a syntax toggle.
The fill
& stroke
properties
have *-image
, *-position
, *-size
, and *-repeat
sub-properties specified –
but not currently implemented.
Any changes to similar background/border productions,
should apply here.
I think this is the only place a syntax toggle
would impact SVGs.