Skip to content

feat: add extendable CSSProperties interface#9587

Merged
Princesseuh merged 2 commits intowithastro:mainfrom
jjenzz:css-properties-interface
Jan 3, 2024
Merged

feat: add extendable CSSProperties interface#9587
Princesseuh merged 2 commits intowithastro:mainfrom
jjenzz:css-properties-interface

Conversation

@jjenzz
Copy link
Copy Markdown
Contributor

@jjenzz jjenzz commented Jan 3, 2024

Changes

Adds a CSSProperties interface to the style attribute that consumers can extend to add their own custom properties. This matches the approach from other frameworks, e.g React and SolidJS.

Testing

I can't seem to find tests for the types, but please do point me in the right direction if they exist somewhere.

CleanShot.2024-01-03.at.00.44.49.mp4

Docs

withastro/docs#6062

/cc @withastro/maintainers-docs for feedback!

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 3, 2024

🦋 Changeset detected

Latest commit: 4976390

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Jan 3, 2024
@jjenzz jjenzz force-pushed the css-properties-interface branch from 98a96b2 to 9f82757 Compare January 3, 2024 00:19
@jjenzz jjenzz force-pushed the css-properties-interface branch from 9f82757 to f09a7ed Compare January 3, 2024 00:43
Copy link
Copy Markdown
Member

@Princesseuh Princesseuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is awesome.

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
@Princesseuh Princesseuh merged commit da307e4 into withastro:main Jan 3, 2024
@astrobot-houston astrobot-houston mentioned this pull request Jan 3, 2024
@jjenzz jjenzz deleted the css-properties-interface branch January 6, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants