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

fix(assets): Propagate sizes attribute on all sources #8986

Merged
merged 6 commits into from
Nov 2, 2023

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Nov 2, 2023

Changes

The sizes attribute needs to be on every source element, much like it is on the img one. We were wrongly not including it.

This PR also includes a small refactor to the types of the internal srcSet object we pass around, we had two types with the same name when really, only one is needed.

Testing

Edited the picture test to test for sizes as well, since you can't really use widths without it anyway.

Docs

N/A

Copy link

changeset-bot bot commented Nov 2, 2023

🦋 Changeset detected

Latest commit: cbdacfc

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 the pkg: astro Related to the core `astro` package (scope) label Nov 2, 2023
@ematipico
Copy link
Member

Changeset missing

@github-actions github-actions bot added the pr: docs A PR that includes documentation for review label Nov 2, 2023
@Princesseuh Princesseuh merged commit 910eb00 into main Nov 2, 2023
4 checks passed
@Princesseuh Princesseuh deleted the fix/picture-sizes-on-sources branch November 2, 2023 20:34
@astrobot-houston astrobot-houston mentioned this pull request Nov 2, 2023
skirianov added a commit to skirianov/astro that referenced this pull request Nov 9, 2023
natemoo-re pushed a commit that referenced this pull request Nov 22, 2023
* fix(assets): Propagate `sizes` attribute on all sources

* refactor: small refactor exposed srcSet types

* test: update test with a sizes

* chore: changeset

* fix: use a type import
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.

2 participants