Coder Social home page Coder Social logo

Comments (5)

joseBasso avatar joseBasso commented on June 15, 2024

From next docs - "Warning: When you define a custom PostCSS configuration file, Next.js completely disables the default behavior" (auto prefixer and etc.).

Looks like we need to add the default postcss stuff to our custom config

Next.js Customizing PostCSS plugins

from clutch.

joseBasso avatar joseBasso commented on June 15, 2024

Fixed the problem on Minimal Template so any future projects won't hit this problem. If we feel the need to migrate old projects, let me know and I'll do it

from clutch.

MatthewHager avatar MatthewHager commented on June 15, 2024

I think this is fine. We can manually update existing projects. However, I want to make sure that our config file is exactly like the defaults provided by Next. Would be awesome if there was a way to extend instead of override. If Next.js updates this file, would be great if that flowed through somehow. This was an easy issue to miss because it doesn't fail loudly.

from clutch.

joseBasso avatar joseBasso commented on June 15, 2024

True. CSS Nesting landed in Firefox a few weeks ago so if we are happy with the browser support - https://caniuse.com/css-nesting - we could remove the file and use the next.js default since our only override is postcss-nested.
However, this would mean that our sites don't run at all in IE and a few others

from clutch.

joseBasso avatar joseBasso commented on June 15, 2024

Never mind. CSS nesting in Chrome does not support nested rules that start with '&' so the approach of deleting the file won't work because our styles generation needs that

The solution in place solves everything except the scenario you wrote about Next.js updating the file. But from their docs it looks inevitable. On the bright side, it is unlikely and easy to solve if it happens so I don't think it is worth investing too much time into it.

We can revisit if you think it is important

from clutch.

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.