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(runtime): place scoped component styles after preconnect links but before custom styles #5938

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

christian-bromann
Copy link
Member

@christian-bromann christian-bromann commented Aug 12, 2024

What is the current behavior?

This is an enhancement to a fix we made in in #5926 which caused our Nightly build to fail due to the inability to place custom styles in the HTML template as all component styles were injected last in the <head /> tag.

STENCIL-1372

What is the new behavior?

Place scoped component styles after existing preconnect links but allow custom styles to be set at the end of the <head /> tag.

Documentation

I will raise a separate PR to the docs page mentioning this behavior.

Does this introduce a breaking change?

  • Yes
  • No

Testing

Enhanced existing e2e test.

Other information

n/a

Copy link
Member

@tanner-reits tanner-reits left a comment

Choose a reason for hiding this comment

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

Tested this out with the failing Framework test and still having the same issue. If there are no preconnect links, can we insert the styles where they were going before (i.e. before the first link tag)?

@christian-bromann
Copy link
Member Author

Good catch @tanner-reits , I totally missed that use case but added a change with a test.

Copy link
Member

@tanner-reits tanner-reits left a comment

Choose a reason for hiding this comment

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

Looks good in the Framework test case 👍

@christian-bromann christian-bromann added this pull request to the merge queue Aug 14, 2024
Merged via the queue into main with commit 8f92b11 Aug 14, 2024
88 checks passed
@christian-bromann christian-bromann deleted the cb/fix-style-tag-location branch August 14, 2024 00:17
@christian-bromann
Copy link
Member Author

This patch has been published in Stencil v4.21.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants