Repository navigation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just move it up here with the rest of the background related properties?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood your first comment as moving the rule inside
.zen-toolbar-background, rather than inside the existing pseudo-element block.If you meant this nesting, I tested it locally:
It brings back the right-sidebar gradient shift. The inner
&cannot represent the parent pseudo-elements, so the positioning does not apply. This is a CSS nesting limitation.We could keep the current structure, where the condition comes before the pseudo-elements:
Or use a custom property to put
background-positionalongside the other background properties:Both options pass all 16 rendering assertions on the local Firefox 157 runtime, including both background layers with the sidebar on the left and on the right. The deeper nesting above fails the two right-sidebar color checks. The left sidebar passes in all three versions.
Which approach would you prefer?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice, but I dont think we need
!important?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good callout on
!important. I verified that the current rule works without it and removed it.One clarification: the first snippet in my earlier reply was the failing example. Nesting the condition inside
&::before, &::afterdoes not work because the inner&cannot represent pseudo-elements. I reran that exact version with and without!important. Both leave the position at0% 0%and bring back the gradient shift. I agree it looks cleaner, but that nesting is not a working option.We have two working options:
!important:The second keeps the properties together, but adds a custom property and needs
!importantto override the existing, more specificbackgroundshorthand.Both pass the rendered-color checks for left/right sidebars and both background layers locally. Happy to use the second if you prefer that structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, in that case, it should be alright now