Skip to content

Commit

Permalink
fix(pdf-reader): correct background color and highlight variable names
Browse files Browse the repository at this point in the history
Rename variables for PDF background colors to accurately reflect their purpose:
- Change '$pdf-background' to '$pdf-highlight-background' in light theme
- Change '$pdf-background' to '$pdf-hightlight-background' in dark theme

Additionally, adjust the CSS to set the text layer background color based on the theme mode:
- For light theme: use '--b3-theme-background' for text layer background
- For dark theme: continue using '--b3-theme-background' for text layer background

These changes improve variable naming consistency and ensure proper theme application.
  • Loading branch information
mustakshif committed Oct 6, 2024
1 parent ef5f76d commit bbd4e66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions style/typography/pdf-reader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@
.pdf__outer#outerContainer {
&:not(.pdf__outer--dark) {
@for $i from 1 through 7 {
$pdf-background: map-get($theme-light, pdf-background#{$i});
--b3-pdf-background#{$i}: #{$pdf-background};
$pdf-highlight-background: map-get($theme-light, pdf-background#{$i});
--b3-pdf-background#{$i}: #{$pdf-highlight-background};
}
}

&.pdf__outer--dark {
@for $i from 1 through 7 {
$pdf-background: map-get($theme-dark, pdf-background#{$i});
--b3-pdf-background#{$i}: #{$pdf-background};
$pdf-hightlight-background: map-get($theme-dark, pdf-background#{$i});
--b3-pdf-background#{$i}: #{$pdf-hightlight-background};
}
}

.pdfViewer .page .textLayer {
:root[data-theme-mode="light"] &:not(.pdf__outer--dark) .pdfViewer .textLayer {
background-color: var(--b3-theme-background);
}


:root[data-theme-mode="dark"] &.pdf__outer--dark .pdfViewer .textLayer {
background-color: var(--b3-theme-background);
}



#sidebarContainer {
top: 42px;
Expand Down
2 changes: 1 addition & 1 deletion theme.css

Large diffs are not rendered by default.

0 comments on commit bbd4e66

Please sign in to comment.