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

Feature: Add @property definitions to CSS plugin output #166

Open
davejsdev opened this issue Dec 10, 2023 · 2 comments
Open

Feature: Add @property definitions to CSS plugin output #166

davejsdev opened this issue Dec 10, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@davejsdev
Copy link
Collaborator

@property definitions help enable type safety for CSS Custom Properties.

MDN Docs: https://developer.mozilla.org/en-US/docs/Web/CSS/@property

It might be good to make a flag for this in the plugin too since defining property types is optional and adds extra weight to the output.

Suggested API:

// Types
interface Options {
  // ...
  propertyDefinitions?: boolean;  // default: true
}

// Usage
pluginCSS({
  propertyDefinitions: false
})
@drwpow drwpow added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Dec 19, 2023
@deecodess
Copy link

Hey! Would love to work on this!

@drwpow
Copy link
Collaborator

drwpow commented Feb 6, 2024

@deecodess Sure! I’d be happy to have some help! But before you start, I’d love to see a proposal (maybe just as a reply to this issue) for what each DTCG token type would translate to in a @property declaration. That way we are on the same page!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants