shiny- and shiny-theme- prefixes, add bootstrap page adapter
#6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP, mostly for discussion and tinkering. This PR does a few things:
First, I added the
shiny-prefix to props that are officially part of our design system, e.g.--shiny-text-1instead of--text-1.I added a new layer of variables that are intended to be "public" facing in the sense that they can be modified at the page level or by page-level CSS. These are prefixed with
shiny-theme-, e.g.--shiny-theme-text-1. The explicit goal of these properties is to serve page-level adapters in situations where we want the shiny design system to inherit from the page.The
--shiny-*tokens in this system are considered the component-facing properties; these should be used by the web components or by adapters for web components. I updated the shoelace adapter to use these tokens.The motivation for this is two-fold:
First, it increases clarity around the source of our design tokens. Without the
shiny-prefix, it can be hard to tell which properties come from open props and which properties are aliases we've created ourselves.CSS variables cannot refer to themselves, so for page-level adapters to set a CSS variable, the fallback value in that adapter cannot refer to the variable being set. Introducing
--shiny-theme-*allows page-level adapters to be included in more situations and reduces the risk that an unset variable will break a design token variable.