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

How to disable global styles or remove "!important" of style rule #351

Open
yinxin630 opened this issue Apr 3, 2020 · 4 comments
Open

Comments

@yinxin630
Copy link

Hi, I import some third party stylesheets. But some styles not work becase of lunar has inject some global styles with !important

Such as
image

If I force let globals to be null in here. My app will work well

So is there any general way to fulfill my needs?

@milesj
Copy link
Contributor

milesj commented Apr 15, 2020

@yinxin630 Important comes from Aphrodite and cannot be changed.

@BarthesSimpson
Copy link

Aphrodite has an option to override the automatic addition of !important: Khan/aphrodite#104

@milesj
Copy link
Contributor

milesj commented Apr 27, 2020

@BarthesSimpson While true, that functionality is abstracted away in Lunar so you wouldn't be able to control that.

@moyus
Copy link
Collaborator

moyus commented Oct 27, 2020

In your webpack config, add this alias:

...
  resolve: {
    alias: {
      aphrodite: 'aphrodite/no-important',
    },
  },
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants