Giter Club home page Giter Club logo

Comments (8)

rowellx68 avatar rowellx68 commented on May 18, 2024 2

Could allow SASS-like writing of CSS --> https://github.com/jonathantneal/precss

from razzle.

ranyefet avatar ranyefet commented on May 18, 2024 1

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.

b2whats avatar b2whats commented on May 18, 2024

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

b2whats avatar b2whats commented on May 18, 2024

and may be change aphrodite on css-look or jss??

from razzle.

ranyefet avatar ranyefet commented on May 18, 2024

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.

jaredpalmer avatar jaredpalmer commented on May 18, 2024

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

b2whats avatar b2whats commented on May 18, 2024

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

jaredpalmer avatar jaredpalmer commented on May 18, 2024

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)

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.