Randy Hall Randy Hall - 1 year ago 86
CSS Question

Meteor ignore one css file

Seems like something that would have been asked/answered already but I cannot find anything related to this.

I have some CSS files that came with some packages. I want to not utilize a particular CSS file. Everything else in the package is great, but I'm having to use a lot of specificity to override the default styles it launches with, and it just seems hacky to override instead of remove.

I also don't want to just delete the file because I will likely want to update this package as new versions are released.

Is there some

method of doing this?

Answer Source

The simplest way is probably to fork this package on github and clone it (git clone https://github.com/author/package.git package-clone) as a local package of your app (in my-app/packages/).

Then you can edit the package.js file of the cloned package and simply comment the api.addFiles directive where the problematic CSS is added.

Synchronizing with the package maintainer would be only a matter of git pulling the latest commits from the source repo.

You'll need to meteor remove author:package first and then add your local clone using meteor add package-clone.