-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fix Safari devtools issues because of nested @supports at-rules without normal rule
#19069
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
Merged
+49
−33
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is not strictly needed to make it work, but without it the Safari devtools show weird results. It is a Safari browser bug, but this is a small enough workaround that it is worth adding ourselves. If we ever handle flattening ourselves, then this could in theory also go away.
|
Have we filed (or found) a webkit bug for this? |
thecrypticace
approved these changes
Oct 6, 2025
|
I couldn't find one immediately, but will talk to you about this tomorrow 👍 Going to merge this in the meantime. |
This was referenced Oct 20, 2025
|
This change invalidated daisyUI input placeholder color in chrome 141 browser and had to be returned to v4.1.14 |
RobinMalfait
added a commit
that referenced
this pull request
Oct 23, 2025
This PR essentially reverts #19069 We added the nested `&` inside the `@supports` query when we create fallbacks for color-mix so that devtools (Safari) doesn't freak out. This works in most cases, however, if you have a parent pseudo element like `::before`, then the browser will not allow the nested `&` resulting in invalid CSS. This PR means that we go back to the broken devtools experience in Safari, but at least the CSS is valid and works as expected. Fixes: #19183
This was referenced Oct 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a weird Safari rendering bug in the devtools. This seems to be happening when using
@supports, especially nested@supportsat-rules.The issue is that our color-mix fallback generates declarations directly in
@supportsat-rules which causes the weird rendering bug in Safari.Adding this intermediate
&rule seems to fix the issue.This is a workaround for a browser bug, but the additional 3 characters shouldn't be the end of the world.
Test plan
& { }intermediate ruleFixes: #19065
[ci-all]