Skip to content

Commit

Permalink
fix: remove .annotationEditorLayer rules from pdfjs scss mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpedemonte committed Jul 25, 2024
1 parent 8c6abce commit 24da19c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 426 deletions.
4 changes: 2 additions & 2 deletions packages/discovery-styles/scripts/update-styles-from-pdfjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ async function genPdfjsScss(originalPdfjsWebCss, outputPdfjsWebScss) {
const cssText = fs.readFileSync(originalPdfjsWebCss, { encoding: 'utf-8' });
const cssRoot = postcss.parse(cssText);

// remove rules not related to .textLayer
// remove rules not related to .textLayer (except for those that also reference .annotationEditorLayer)
cssRoot.walkRules(rule => {
if (rule.selector.includes('.textLayer')) {
if (rule.selector.includes('.textLayer') && !rule.selector.includes('.annotationEditorLayer')) {
return;
}
rule.remove();
Expand Down
Loading

0 comments on commit 24da19c

Please sign in to comment.