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

Group and scope the findbar rules using CSS nesting #18568

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Aug 5, 2024

The findbar CSS rules predate the general availability of CSS nesting, which makes them more difficult to understand and change safely. The primary issues are that the findbar rules are spread all over the viewer.css file, they share blocks with non-findbar elements and the scope of the rules is sometimes bigger than necessary.

This refactoring groups all findbar-related CSS rules together, scoped to the top-level #findbar element, for improved overview and isolation. Note that this patch only intends to move the existing rules around and not change any behavior yet, but it does lay the foundation for e.g. making the findbar respect the browser.uidensity preference in Firefox in follow-up work.

Notes for the reviewer:

Image

  • The other rules have been moved as-is, but only placed in alphabetical order in the new blocks for increased readability.

Extracts a part of #18385.

@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/8ad2c1f7d669cf4/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/8ad2c1f7d669cf4/output.txt

Total script time: 1.03 mins

Published

@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/a99fa62fe79c1ac/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/ffc9debbfff0603/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/a99fa62fe79c1ac/output.txt

Total script time: 8.49 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/ffc9debbfff0603/output.txt

Total script time: 19.05 mins

  • Integration Tests: Passed

web/viewer.css Outdated Show resolved Hide resolved
web/viewer.css Outdated Show resolved Hide resolved
web/viewer.css Outdated Show resolved Hide resolved
The findbar CSS rules predate the general availability of CSS nesting,
which makes them more difficult to understand and change safely. The
primary issues are that the findbar rules are spread all over the
`viewer.css` file, they share blocks with non-findbar elements and the
scope of the rules is sometimes bigger than necessary.

This refactoring groups all findbar-related CSS rules together, scoped
to the top-level `#findbar` element, for improved overview and
isolation. Note that this patch only intends to move the existing rules
around and not change any behavior yet, but it does lay the foundation
for e.g. making the findbar respect the `browser.uidensity` preference
in Firefox in follow-up work.

Co-authored-by: Calixte Denizet <calixte.denizet@gmail.com>
@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/c5133c705aaff0e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/c5133c705aaff0e/output.txt

Total script time: 1.03 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, thank you.

@timvandermeij timvandermeij merged commit 4569e88 into mozilla:master Aug 8, 2024
6 checks passed
@timvandermeij timvandermeij deleted the css-findbar branch August 8, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants