Giter VIP home page Giter VIP logo

Comments (5)

1aron avatar 1aron commented on May 19, 2024

@gammx What's your Master CSS version now? It works for me.

Generated CSS

Screen Shot 2022-08-25 at 10 31 14 PM

JIT in console

Screen Shot 2022-08-25 at 10 32 27 PM

from css.

gammx avatar gammx commented on May 19, 2024

@1aron I'm using the latest version, I'm also using the manual/hybrid rendering setup with Next.js (https://docs.master.co/css/setup/nextjs#hybrid-rendering), Here are some things I've noticed:

  • If I use Next.js with SCSS and declare the scoped variable in a .scss file it doesn't work, but it works with a .css file
  • If I refresh the page, the class is generated but it's using the color as variable --#F9F9F9:
<style id="master-css">
    .font-color\:\$\(text-primary\){color:var(--#F9F9F9)}
</style>
  • If I remove the manual initialization/hybrid rendering declared in my _document.tsx file, it works with both .scss and .css but it's weird because the style tag gets empty:
<style id="master-css"></style>

So I guess it's something with the Next.js setup... maybe?

from css.

gammx avatar gammx commented on May 19, 2024

Ok I managed to get it working removing some conflicts with other classes, but it works only if I remove hybrid rendering, I get this with the https://docs.master.co/css/setup/nextjs#hybrid-rendering setup:

<style id="master-css">
    .font-color\:\$\(text-primary\){color:var(--#F9F9F9)} /*instead of var(--text-primary)*/
</style>

And it works if I remove the hybrid rendering code, but the style tag gets empty:

css

from css.

1aron avatar 1aron commented on May 19, 2024

If it is JIT, Master CSS will use the native style.sheet API to manipulate CSS rules. You can't see it through inspect, but you can use console.log.

from css.

gammx avatar gammx commented on May 19, 2024

Nice, well, I removed the hybrid rendering setup to stop getting the color:var(--#F9F9F9) thing, thanks:)

from css.

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.