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

Support objects for style attribute #3776

Merged
merged 3 commits into from
Jul 21, 2022
Merged

Support objects for style attribute #3776

merged 3 commits into from
Jul 21, 2022

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Jun 30, 2022

Changes

  • Follow-up to MDX support #3706
  • Adds support for style={{ color: 'red' }} props
  • Importantly, does not handle number => px string conversion for you. The logic in React that handles this is massive, and it's a convenience more than anything. Preact gets away with requiring explicit units.

Testing

Covered by #4002

Docs

Not going to document this as it's a compat feature

@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2022

⚠️ No Changeset found

Latest commit: e389d94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jun 30, 2022
@natemoo-re natemoo-re mentioned this pull request Jun 30, 2022
@Princesseuh
Copy link
Member

Princesseuh commented Jun 30, 2022

Our JSX definitions should get updated so users don't get errors when using objects inside the editor

Here's the corresponding lines: for HTML elements and for SVG elements

Copy link
Contributor

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

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

Instyley approved 👏

@natemoo-re natemoo-re marked this pull request as ready for review July 21, 2022 17:14
@natemoo-re natemoo-re merged commit 2a5e92f into main Jul 21, 2022
@natemoo-re natemoo-re deleted the feat/obj-style branch July 21, 2022 17:16
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants