The latest plans for shadows suggest that they'll be defined algorithmically from an elevation value and a foreground luminance value. This may not be possible for the pipeline to export at all. If shadow values were stored that way in the JSON, what would we do with them for, for example, CSS?
Export them as raw values such as --myshadow-elevation: 3; and then access the value of that CSS variable in JavaScript with something like document.documentElement.getPropertyValue("--myshadow-elevation")?
Export shadow values not as CSS variables, but in a separate JSON exported alongside the CSS variables that the website also imports? { "myshadow.elevation": 3 }
Simplify our shadow story so that we can deterministically export a single string value that can be assigned to box-shadow?
Leave shadows out of the token structure entirely?
The latter two are clearly much simpler than the others, but limits what can be done with algorithmic shadows.
ThemeShadows in WinUI are already defined simply as an elevation value in Z-pixels, not specific offsets and colors and blur radii like in CSS.
The latest plans for shadows suggest that they'll be defined algorithmically from an elevation value and a foreground luminance value. This may not be possible for the pipeline to export at all. If shadow values were stored that way in the JSON, what would we do with them for, for example, CSS?
--myshadow-elevation: 3;
and then access the value of that CSS variable in JavaScript with something likedocument.documentElement.getPropertyValue("--myshadow-elevation")
?{ "myshadow.elevation": 3 }
box-shadow
?The latter two are clearly much simpler than the others, but limits what can be done with algorithmic shadows.
ThemeShadow
s in WinUI are already defined simply as an elevation value in Z-pixels, not specific offsets and colors and blur radii like in CSS.