Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use css frameworks with jss: bootstrap, material. #247

Closed
zerkalica opened this issue Jun 23, 2016 · 7 comments
Closed

How to use css frameworks with jss: bootstrap, material. #247

zerkalica opened this issue Jun 23, 2016 · 7 comments
Labels
question Documentation is not good enough.

Comments

@zerkalica
Copy link

Can jss combine global-defined styles?

Example, using styles from framework free Material Design lite

const style = jss.createStyleSheet({
   button: {
      extendGlobal: 'mdl-button mdl-js-button mdl-button--fab mdl-button--colored'
   }
})

style.classes.button

Is there bootstrap or material, ported to jss (framework-free pure functions with cssx and jsx)?

For example: bootstrap, ported to css-modules.

@kof
Copy link
Member

kof commented Jun 23, 2016

  1. you would need to add those classes to your element or we could add the possibility of using global classes in jss-extend plugin
  2. no, I always wanted to port bootstrap to jss but didn't have time for that, feel free to do it! Also maybe there is a way to convert bootstrap to jss, there will be adjustments needed in cli

@kof kof added the question Documentation is not good enough. label Jun 23, 2016
@zerkalica
Copy link
Author

I think, people need possibility of using global classes in jss-extend. In this case jss - abstraction layer between any css-framework and application code. We don't need to touch html or jsx, if css classnames changed and we will be able to migrate from global-css classes to pure jss little by little.

It's hard to manual parse and maintain tons of scss files and converts them to jss functions. May be create smart scss to jss converter?

@kof
Copy link
Member

kof commented Jun 23, 2016

scss/stylus to jss converter would be also part of the cli repository, also on my very long todo list.

@kof
Copy link
Member

kof commented Jul 13, 2016

I think we can introduce jss-compose #265

@yantakus
Copy link

@kof jss-compose is a great tool, but scss to jss converter would give us possibility to convert variables of a scss library into js ones and use them with jss in components. This is the most significant advantage of css libraries in my opinion - when you are able to have variables for screen sizes (media queries), colors, sizing, etc. And then use them throughout the app.

Importing of compiled css files prevents us from using variables and editing them. Of course we can change them in scss and compile to css again when needed, but it still doesn't allow us to import variables into jss-powered styles.

@kof
Copy link
Member

kof commented Sep 23, 2016

yes, scss2jss converter is also on the roadmap #166

@kof
Copy link
Member

kof commented Sep 23, 2016

Feel free to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Documentation is not good enough.
Projects
None yet
Development

No branches or pull requests

3 participants