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

fix(pdf): override css missing asset #1505

Merged
merged 4 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "box-content-preview",
"version": "2.101.0",
"version": "2.100.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this intentional? Seems like it would cause problems.

"description": "Box Content Preview UI Element",
"author": "Box (https://www.box.com/)",
"license": "SEE LICENSE IN LICENSE",
Expand Down
11 changes: 11 additions & 0 deletions src/lib/viewers/doc/_docBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,17 @@ $thumbnail-sidebar-width: 191px; // Extra pixel to account for sidebar border
}
}

//overwriting background image in pdf_viewer.css. Was causing 404's
/* stylelint-disable declaration-no-important */
.pdfViewer .page.loadingIcon {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should there be a space between .page and .loadingIcon? It's a child element, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Believe it or not no. That's how pdf.js v3.6.7.2 has it. I can take out line 300 but I think we need the other one. Check this out https://github.com/mozilla/pdf.js/blob/v3.6.172/web/pdf_viewer.css#L162

background-image: none !important;
bfoxx1906 marked this conversation as resolved.
Show resolved Hide resolved
}

.pdfViewer .page.loadingIcon::after {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have other .page .loadingIcon styles a few lines up. Can we move these rules into the nested rules?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

background-image: none !important;
}
/* stylelint-enable declaration-no-important */

.pdfViewer .page.pinch-page {
padding: 0;
visibility: visible;
Expand Down