I want longhand properties for every CSS shorthand

Submitted by Cory Birdsong

This idea is currently being discussed.

Most CSS shorthand properties — like background, border, and font — come with individual longhand equivalents that let you set each component independently. This is essential for transitions and animations, where you often want to animate just one part of a compound value.

However, a few commonly used properties are missing their longhands entirely:

Without longhands, animating or transitioning a single component of these properties — say, fading just the shadow color on hover — requires rewriting the entire value in every keyframe or transition state. Developers work around this by declaring shadow values in CSS custom properties and animating the variable, but this is a cumbersome workaround for something that should be native.

I want longhand properties for text-shadow and box-shadow (and any other shorthands that still lack them) so that I can write clean, maintainable animations and transitions without duplicating full shadow declarations or resorting to proxy custom properties.

Tagged
CSS
Votes
0
What are votes for and how are they tallied?