argyleink / open-props

CSS custom properties to help accelerate adaptive and consistent design.

Home Page:https://open-props.style

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add constructible stylesheet as an output format

calebdwilliams opened this issue · comments

As a developer who often works with custom elements and shadow DOM, I would love to have access to open-props using constructible stylesheets as an output target. I'd be happy to contribute this feature if there's interest but limited bandwidth.

Open Props offers props on :host, is that what you need? otherwise, cSS are a loading strategy and composability feature, the props don't know or care about these details?

Sorry, I should have been more clear. I’m just looking for the utility classes that are available like buttons, shapes and layouts. Anything where classes are applied so I can use them in shadow roots.

i leave classes up to user space.. the normalize and button stylesheets target tags by name and don't offer a class.

Open Props v2 has a beta utility file you could try out tho? works like this:

<div class="MyComponent grid surface rounded shadow padding"></div>
.MyComponent {
  --_padding: var(--size-5);
}

here's a playground where i'm toying around with the thoughts and code