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

Use a CSS-only solution to set the dropdownToolbarButton width (issue 17137) #17138

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

Snuffleupagus
Copy link
Collaborator

Note that CSS-features such as e.g. flex didn't exist, or had poor cross-browser support, back when the JavaScript-based solution was initially implemented.

@Snuffleupagus
Copy link
Collaborator Author

To my surprise, this actually seemed much easier to implement than I originally thought.

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 1

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 1.44 mins

Published

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

And the arrow is at the right place in arabic !
LGTM. Thank you very much.

@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Oct 19, 2023

And the arrow is at the right place in arabic !

That's because we're (already) positioning it manually, in a direction-aware way, at the end of the dropdown:

pdf.js/web/viewer.css

Lines 804 to 809 in 6a6f6f1

.dropdownToolbarButton::after {
top: 6px;
inset-inline-end: 6px;
pointer-events: none;
mask-image: var(--toolbarButton-menuArrow-icon);
}

…ue 17137)

Note that CSS-features such as e.g. `flex` didn't exist, or had poor cross-browser support, back when the JavaScript-based solution was initially implemented.
@Snuffleupagus Snuffleupagus merged commit f39bedd into mozilla:master Oct 19, 2023
@Snuffleupagus Snuffleupagus deleted the issue-17137 branch October 19, 2023 11:49
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.

Use some CSS to size correctly the dropdown for the zoom level
3 participants