0

I need to use library https://www.npmjs.com/package/vue-lazytube which has some css applied on h2 and button html elements. What is the way to prevent all these being applied because those styles are breaking existing styles on the website.

example: https://github.com/seeratawan01/vue-lazytube/blob/master/src/components/common/Preview.vue

Sonny49
  • 425
  • 3
  • 18

1 Answers1

0

First, the example .vue file you linked has all CSS nested under the .vlt-preview classname. That nested structure is precisely to avoid accidentally mixing any of the package's CSS with the CSS of other apps. It will not affect any of your app's CSS unless .vlt-preview is a classname you use yourself.

Second, I assume the "css applied on h2" is in reference to the App.vue file in the same github (that's the only file I could find with any h2 CSS). That .vue file and related code is just for the project's online demo ... It will not be included when installing the package.

yoduh
  • 7,074
  • 2
  • 11
  • 21