Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow exports #11

Closed
TravisSpomer opened this issue Aug 25, 2020 · 1 comment
Closed

Shadow exports #11

TravisSpomer opened this issue Aug 25, 2020 · 1 comment
Labels
export Platform-specific export concerns question Further information is requested

Comments

@TravisSpomer
Copy link
Member

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.

@TravisSpomer TravisSpomer added export Platform-specific export concerns question Further information is requested labels Aug 25, 2020
@TravisSpomer TravisSpomer added this to Recently finished in What's going on Aug 4, 2021
@TravisSpomer
Copy link
Member Author

Shadows were added in version 0.3.8 with this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export Platform-specific export concerns question Further information is requested
Projects
No open projects
What's going on
Recently finished
Development

No branches or pull requests

1 participant