5 ms·
I would love to read more about styling inline and completely remove external CSS files. Are there any CSS-frameworks that have been converted to JS but not ar
by NoCulturalFit 11y ago
I would love to read more about styling inline and completely remove external CSS files.
Are there any CSS-frameworks that have been converted to JS but not are not their own components yet? It's easy to find React-Bootstrap but that comes with ready made components, I am looking for styling that's purely in JS so I can make my own components.
Also would a route-component be considered logic or presentation, or maybe it is its own thing and they forgot to mention it?
- bryanlarsen 11y agoI'm not exactly sure what you're asking for, but I'll try to answer anyways. http://material-ui.com/ http://material-ui.com/ is a React component library that uses inline CSS exclusively.
- drhayes9 11y agoI don't like inlining styles as objects in React so I went looking for a solution that would work with the toolchain I'm using for my current project. I'm working on a project now that is using a combination of react-css-modules, webpack, and an ExtractText plugin for webpack that means each React component I write can have an associated CSS file. Each class in the CSS file gets mangled so that it doesn't affect things globally by react-css-modules. Then the ExtractText plugin for webpack pulls all those CSS files out into one, global styles.css file. Ultimately, that means that my CSS file might actually, over the life of the project, shrink! Unheard of. In the same project I'm using redux and redux-router. The router consists of declarative components, like "<ReduxRouter />" and "<Route />".
- phleet 11y agoWe're playing around with inline-styling our components, but pushing the inline-styles into CSS injected into `<style>` tags in the head. It's experimental at the moment, but it's being sent into production shortly: https://github.com/Khan/aphrodite https://github.com/Khan/aphrodite