Question: How to write styles with a deep structure in react native?
See original GitHub issueI really like styled-components
, it is great, thank you @mxstbr for a this module.
I’m trying to use it with react native, but cannot find a way to describe this case:
style: {
transform: [
{ perspective: 850 },
{ translateX: - Dimensions.get('window').width * 0.24 },
{ rotateY: '60deg'},
],
}
export default styled.View`
transform: ???;
`;
Is it possible? Thank you in advance.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to write styles with a deep structure in react native ...
I'm trying to use it with react native, but cannot find a way to describe this case: style: { transform: [ { perspective:...
Read more >Organizing Styles In React Native - Revelry Labs
A useful overview of how to organize styles in React Native for improved maintenance, consistency, and organization: easy to find, ...
Read more >Applying and Organizing Styles in React Native - Manning
From React Native in Action by Nader Dabit. This article discusses organizing styles in React Native within components.
Read more >Styling in React: 4 ways to style a React app - LogRocket Blog
Our guide covers four popular ways to style components in React: inline styling, styled-components, CSS Modules, and Tailwind CSS.
Read more >React Native Styling: Structure for Style Organization
1: Styles are important: make them easy to find ... Keep styles in the root source folder. Styling is a first class concern,...
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
In CSS I think this would look like:
Where
perspective
is a valid stand-alone CSS property andtranslateX
sandrotateY
are both function values that are composed with a space.The
styled-component
could be: (My React Native is sketchy at best)Closing in favor of #210, which will add support for this!