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-ratiophysical (x/y)box-shadowphysical (x/y)text-shadowphysical (x/y)background… (*-positionis listed with shorthands)background-sizephysical (x/y)background-repeatphysical (x/y) and keywords
border-image…border-image-outsetphysical (trbl)border-image-repeatphysical (x/y)border-image-slicephysical (trbl)border-image-widthphysical (trbl)
mask…mask-positionphysical (x/y) with offset keywordsmask-repeatphysical (x/y) and keywordsmask-positionphysical (x/y)
mask-border…mask-border-outsetphysical (trbl)mask-border-repeatphysical (x/y)mask-border-slicephysical (trbl)mask-border-widthphysical (trbl)
object-positionphysical (x/y) with offset keywordsoffset-positionphysical (x/y) with offset keywordsperspective-originphysical (x/y) with offset keywordstransform… (see related functions as well)transform-originphysical (x/y) with offset keywordsrotatephysical (x/y/z)scalephysical (x/y/z)translatephysical (x/y/z)
No change needed…
border-spacinglogical (columns & rows)column-width& proposedcolumn-heightare flow-relativeview-timeline-insetis 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…
borderdefines all sides equallyoutline/outline-widthdefines all sides equallyoverflow-clip-margindefines all sides equallycolumnsalready flow-relativegapalready flow-relativeanimation-rangecontrolled 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-repeathasrepeat-x&repeat-ykeywords- missing
repeat-inline&repeat-block
- missing
mask-repeathasrepeat-x&repeat-ykeywords- 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-startandinline-endalternatives toleftandrightclearhas both logical & physical keywordsfloathas both logical & physical keywords (including page-floats)flex-*&grid-*already flow-relativemargin-trimalready flow-relativescroll-snap-alignalready flow-relativescroll-snap-typehas both logical & physical keywordsscroll-timeline-axishas both logical & physical keywordsplace-*and sub-properties, already flow-relativeposition-areaalready flow-relativeresizehas both logical & physical keywordstext-alignhas both logical & physical keywordstext-align-lasthas both logical & physical keywordsazimuthlogical 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.