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

Remove the stylesheet component #3176

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Nov 4, 2024

This PR removes the stylesheet component. The Style component already renders a stylesheet link in the head if you pass in a link instead of inline CSS. Stylesheet is just a less general version of the Style component. The two components have a very similar name and the exact same purpose which could cause confusion

Reverts #3138

@ealmloff ealmloff added breaking This is a breaking change tweak Small changes to improve experience html Related to the html crate labels Nov 4, 2024
Copy link
Contributor

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@spookyvision
Copy link
Contributor

unlike Stylesheet, Style does not seem to set the rel="stylesheet" attribute, which on my system (Firefox 133.0.3 on Mac) causes the CSS to not apply

@ealmloff
Copy link
Member Author

ealmloff commented Jan 5, 2025

unlike Stylesheet, Style does not seem to set the rel="stylesheet" attribute, which on my system (Firefox 133.0.3 on Mac) causes the CSS to not apply

This PR fixes that issue (here)

@spookyvision
Copy link
Contributor

This PR fixes that issue (here)

Missed that, apologies!

@jkelleyrtp jkelleyrtp requested a review from a team as a code owner January 31, 2025 23:03
@jkelleyrtp
Copy link
Member

I don't want to remove the Stylesheet component. Just coming from a world of html I'm not sure I would know to reach for Style over Stylesheet so if Stylesheet is just an alias to <link rel="stylesheet"> then that's fine.

But, we did need to fix the bug with Style not applying the rel attribute, so I went ahead and just brought those changes in.

@jkelleyrtp jkelleyrtp merged commit 5bb7f51 into DioxusLabs:main Jan 31, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This is a breaking change html Related to the html crate tweak Small changes to improve experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants