React-native: warning Node of type rule not supported as an inline style
See original GitHub issueHey, when I tried to use the below styling in react-native:
const Input = styled.input`
font-size: 1.25em;
padding: 0.5em;
margin: 0.5em;
color: palevioletred;
background: papayawhip;
border: none;
border-radius: 3px;
&:hover {
box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
}
`;
I go the the title warning, which I do not know how to resolve it. If I delete the internal hover section, it works without warning.
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Pseudo selectors not working with styled-components - Reddit
I'm using styled-components library with react native. pseudo selectors after, ... "node of type rule not supported as an inline style".
Read more >Styled-system in react native responsive values - Stack Overflow
I want to use responsive style in my box component but I get error "Node of type atrule not supported as an inline...
Read more >React Styled Components: Inline Styles + 3 Other CSS Styling ...
There are four different ways to style React application, and in this post you will learn about them all. Let's start with inline...
Read more >FAQs - styled-components
The repeated class bumps the specificity high enough to override the source order without being very tedious to write! How can I override...
Read more >Why you shouldn't use inline styling in production React apps
One of the main reasons that inline styling is not a good choice for your application is because it does not support (or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You have to use the native import and a native component.
https://sc-next-docs.philpl.com/docs/basics#react-native
I just found the problem 😕
height: {p => p.inputHeight}px;
instead ofheight: ${p => p.inputHeight}px;
I was missing the$
before the bracketsI wonder if there’s a good way to alert for that.
Thanks anyway