mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Use CSS variables for setting the width of the zoom dropdown (PR 11570 follow-up)
By using CSS variables to set the width of the zoom dropdown, we can simplify both the relevant CSS and JS code. This will not only improve overall maintainability of this code, but should also make it (slightly) easier for third-party users that want to customize the width. Note in particular that by having the code in `Toolbar._adjustScaleWidth` lookup the values of the CSS variables, we no longer need to worry about keeping hard-coded values up-to-date with the CSS rules.
This commit is contained in:
parent
8c2ac85b0a
commit
4a7976f097
3 changed files with 22 additions and 16 deletions
|
@ -82,7 +82,6 @@ function getViewerConfiguration() {
|
|||
container: document.getElementById("toolbarViewer"),
|
||||
numPages: document.getElementById("numPages"),
|
||||
pageNumber: document.getElementById("pageNumber"),
|
||||
scaleSelectContainer: document.getElementById("scaleSelectContainer"),
|
||||
scaleSelect: document.getElementById("scaleSelect"),
|
||||
customScaleOption: document.getElementById("customScaleOption"),
|
||||
previous: document.getElementById("previous"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue