mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
[GV] Increase the height (48px) of the toolbar in order to fit the a11y recommendations (bug 1838602)
and reorganize the toolbar css to use nested styles.
This commit is contained in:
parent
567df42149
commit
0ce6f8b482
1 changed files with 50 additions and 47 deletions
|
@ -37,6 +37,8 @@
|
|||
--toolbar-bg-color: #f9f9fb;
|
||||
--toolbar-divider-color: #e0e0e6;
|
||||
--toolbar-fg-color: #15141a;
|
||||
--toolbar-height: 48px;
|
||||
--toolbar-border-width: 1px;
|
||||
|
||||
--toolbarButton-download-icon: url(images/gv-toolbarButton-download.svg);
|
||||
}
|
||||
|
@ -110,8 +112,7 @@ body {
|
|||
#viewerContainer {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
inset-block: 41px 0;
|
||||
inset-inline: 0;
|
||||
inset: var(--toolbar-height) 0 0;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
@ -176,61 +177,63 @@ body {
|
|||
align-items: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
height: calc(var(--toolbar-height) + var(--toolbar-border-width));
|
||||
top: 0;
|
||||
left: 0;
|
||||
box-sizing: content-box;
|
||||
border-block-end: solid 1px var(--toolbar-divider-color);
|
||||
background-color: var(--toolbar-bg-color);
|
||||
}
|
||||
|
||||
#floatingToolbar.show {
|
||||
z-index: 100000;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#floatingToolbar:not(show) {
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.toolbarButton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-style: none;
|
||||
user-select: none;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
width: auto;
|
||||
height: auto;
|
||||
outline: none;
|
||||
position: relative;
|
||||
}
|
||||
border-block-end: solid var(--toolbar-border-width)
|
||||
var(--toolbar-divider-color);
|
||||
background-color: var(--toolbar-bg-color);
|
||||
|
||||
.toolbarButton > span {
|
||||
color: var(--toolbar-fg-color);
|
||||
width: auto;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
&.show {
|
||||
z-index: 100000;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:not(.show) {
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.toolbarButton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-style: none;
|
||||
user-select: none;
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
width: auto;
|
||||
height: 100%;
|
||||
outline: none;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
content: "";
|
||||
background-color: var(--toolbar-fg-color);
|
||||
mask-size: cover;
|
||||
margin-inline: 12px 8px;
|
||||
}
|
||||
|
||||
> span {
|
||||
color: var(--toolbar-fg-color);
|
||||
width: auto;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&#download::before {
|
||||
mask-image: var(--toolbarButton-download-icon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:is(.toolbarButton .dialogButton)[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.toolbarButton::before {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
content: "";
|
||||
background-color: var(--toolbar-fg-color);
|
||||
mask-size: cover;
|
||||
margin-inline: 12px 8px;
|
||||
}
|
||||
|
||||
#download::before {
|
||||
mask-image: var(--toolbarButton-download-icon);
|
||||
}
|
||||
|
||||
.dialogButton {
|
||||
width: auto;
|
||||
margin: 3px 4px 2px !important;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue