Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

@media queries adding !important #877

Closed
lightninglu10 opened this issue Feb 25, 2017 · 1 comment
Closed

@media queries adding !important #877

lightninglu10 opened this issue Feb 25, 2017 · 1 comment

Comments

@lightninglu10
Copy link

Hey guys, my @media queries are unexpectedly adding !important to the CSS property.

This messes up my flow as I can't add !important in react inline styles.

I don't always want @media queries to take precedent. is there a fix for this?

@stefvhuynh
Copy link
Contributor

stefvhuynh commented May 5, 2017

I believe adding !important is expected behavior (https://github.com/FormidableLabs/radium/blob/master/src/plugins/resolve-media-queries-plugin.js#L56). Media query rules are all pushed into a <style> tag at the bottom of the root element and I believe the only way to override the inline styles that radium puts into an element tag is by adding !important in that <style> tag. The issue might be more that you can't add !important to the inline styles (facebook/react#1881)?

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

No branches or pull requests

2 participants