Comments (8)
Could allow SASS-like writing of CSS --> https://github.com/jonathantneal/precss
from razzle.
Maybe we can use Isomorphic-Style-Loader which render CSS critical path, so it fixes the issues to loading the whole app CSS for every page.
What do you think?
from razzle.
@jaredpalmer mm, yes
{ test: /\.css$/, loader: "style!css!postcss" }, //vendor css
{ test: /\.mcss$/, loader: "style!css?module&localIdentName=[name]__[local]___[hash:base64:5]!postcss" }, // css modules for complex logic
from razzle.
and may be change aphrodite on css-look or jss??
from razzle.
Does CSS modules support server side rendering?
Also what about selectors like nth-child and other stuff that currently not usable?
Will CSS modules improve on that?
from razzle.
@ranyefet yes, css modules does support ssr, we could use extract-text loader. Problem is that you usually have to include all of the css for the whole app, which can get heavy. There are ways to async load using react-side-effect though.
from razzle.
@jaredpalmer
Problem is that you usually have to include all of the css for the whole app, which can get heavy.
This is not problem. We can wrap css from css files similary aphrodite and render on server only critical styles for first view.
from razzle.
Update on this:
I am had an idea / working on modification to jsxstyle
that I'm hoping will be a game changer. If you aren't familiar with jsxstyle
, you co-locate component styles as props like <Block backgroundColor="#000" />
. My fork introduces special prop prefixes for the most common pseudo selectors. When it's done you'll be able to write <Block backgroundColor="#000" hoverBackgroundColor="#555" />
. It will then extract non-conflicting classnames as it does now, but also add new pseudo selectors declarations to respective CSS classes.
When I'm finished, I will likely replace Aphrodite with this solution.
from razzle.
Related Issues (20)
- HMR does not activate when a file containing only types is modified
- Dependency Terminate uses GPLv2 License - any alternative?
- Can't deploy to heroku
- plugin options are coming to be undefined HOT 4
- Content Security Policy Implementation HOT 1
- Regarding deployment in server HOT 5
- For Laravel project, add it where ? please HOT 1
- Is the project abandoned? 🤔 HOT 8
- How to expose config to out ?
- digital envelope routines::unsupported HOT 1
- Why razzle forcing buffer and process package in ProvidePlugin if webpack version is 5
- Unexpected token: punc (.) HOT 6
- Does latest razzle support react 18 ? HOT 1
- Support for react 18 HOT 4
- ~Wrong repo~
- How to use webpack 5 with Razzle 4 HOT 1
- Razzle utilizes vulnerable versions of browserslist and minimatch as nested dependencies, causing security issues.
- Maybe mark this project as abandoned in its github repository description and in readme? HOT 2
- Anyone has a fork updated for webpack-dev-server 5? HOT 1
- How to use 'mini-css-extract-plugin' in razzle config HOT 1
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 razzle.