Comments (5)
@hendrul just to note, we've decided to move on with props.theme
convention, so theming support had been released in v2.2.0
there is an example with styled-system
: https://codesandbox.io/s/0p156o834n
@jxnblk btw awesome project, thanks!
from styled-system.
Right, what Iām saying is that the convention is to pass context values as props rather than leaving them on the context object
from styled-system.
Unless theme
is passed as a prop (which it looks like it's still only in context here https://github.com/cssinjs/styled-jss/pull/35/files#diff-04c6e90faac2675aa89e2176d2eec7d8R66), styled-system won't be able to pick up the theme values. That said, I don't see why this styled-jss
library shouldn't work like every other styled-components clone
from styled-system.
Yes with the PR they are passing the theme, look at the end of the PR,
+const Button = styled('button')((props, {theme}) => ({
+ color: theme.color,
+ 'background-color': theme.backgroundColor,
from styled-system.
Closing this out. Again, styled-system should work with any CSS-in-JS library that passes props.theme
as a convention
from styled-system.
Related Issues (20)
- Storybook control docs generation based on theme
- Use styled-system properties inside of styled component definition with Emotion (not default props)
- Could not find a declaration file for module '@styled-system/css' implicitly has an 'any' type. HOT 1
- Combining variants and custom props HOT 2
- Addressing child components in styled-system/css
- [Discussion? šŗ ] Text transform - capitalize
- What's going to happen with this project? HOT 49
- Custom breakpoints are ignored when using system function HOT 1
- Sizes best practices HOT 1
- Using an alias key name for `space` HOT 3
- css module not linking theme colors for ::before pseudo element HOT 2
- Typescript `variants` type HOT 1
- alignItems media query not applying HOT 1
- TypeError: undefined is not an object (evaluating '_layout["default"].width')
- Variant for multi-elements
- Spacing type doesn't apply styled-components with props HOT 2
- Remove shorthand props HOT 3
- @styled-system/css Documentation Page Missing HOT 1
- Project continued HOT 5
- Your site redirects to github repo HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from styled-system.