GithubHelp home page GithubHelp logo

Comments (5)

lttb avatar lttb commented on May 17, 2024 6

@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.

jxnblk avatar jxnblk commented on May 17, 2024 1

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.

jxnblk avatar jxnblk commented on May 17, 2024

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.

hendrul avatar hendrul commented on May 17, 2024

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.

jxnblk avatar jxnblk commented on May 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.