ansu5555 / pdf-viewer-reactjs

A simple PDF viewer for React js

Home Page:https://ansu5555.github.io/pdf-viewer-reactjs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdf-viewer interferes with my app's CSS

danielmaartens opened this issue · comments

@ansu5555 @ansuman5555

We really want to use this pdf viewer but it is interfering with our app's internal css.

We have quite a big application with moving parts and in it's current state I cannot use this package because it interferes with our entire app's css.

Please can you tell me how I can use this without it causing this behaviour.

The app uses Bulma & Material icons for styling so somehow Bulma is overriding your CSS.

I Have the same problem, of @danielmaartens.

When i import pdf-viewer-reactjs , the fonts and the buttons of all my app was overriden.

Any solution for this?

commented

Same problem here. It overrides quite a lot of my internal css. How can this be prevented?

Having the same issue too. Unable to use it as my buttons, modal shapes css all goes haywire. Any good solution to this issue will be really great

Same problem here. Unworkable due to Bulma CSS.

Removed bulma in latest release(v2.0.7), so it will not distort your existing css and you have to provide your own custom css for pdf-viewer.

Since this is a breaking change, but do you think about reverting to use bulma, and create a new branch with a new MAJOR version with this change.

Hi, thanks for your package, I liked your styles and wanted to keep them but didn't want bulma to interfere with my other styles.

So, I've created a wrapper package which wraps this one and compiles bulma css by encapsulating it under .bulma class, adds it to your top-level component's class via changing defaultProps and just re-exports your package.

While, it's not the best solution since it imports bulma for only this package, it's a simple way to make it work. In case anyone else wants the same, you can check out https://github.com/corupta/pdf-viewer-reactjs-bulma-wrapped

Doesn't look like your Bulma dependency issues have been resolved in version
"pdf-viewer-reactjs": "^2.1.1"

And when I install bulma and bulma helpers, the pdf file does not load 😊

@bensezio in my case, I found out that pdf sometimes loads, and sometimes doesn't, unrelated to bulma.
When I dug out for the details, realized that dependency of dependency of dependency of this package, or something similar was deprecated and buggy/unstable.

when I next the page error occured

I am facing font-related issues..
./node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2 1:4
Module parse failed: Unexpected character ' ' (1:4)

Any solution for this?

Bulma is still loaded on v2.2.3, and is still messing with other styles