Coder Social home page Coder Social logo

Comments (4)

egoist avatar egoist commented on September 27, 2024

I'd like to replace them with some better alternatives, do you have any suggestions about what should be included? PRs are welcome too 🙂

from vuepack.

dodas avatar dodas commented on September 27, 2024

Starting with precss,

I removed:

postcss-custom-properties - already have Sass-like postcss-advanced-variables, and cascading feature of custom properties cannot be mimicked / transformed to CSS3.
postcss-nested - already have Sass-like postcss-nested which does not require & everywhere.
postcss-atroot - I don't see usefulness with Vue component, as everything should be under component's namespace. But maybe someone would find it useful.
postcss-custom-selectors - I just don't use it.

And I added:

postcss-nested-ancestors - I use it to reference parent selector combined with state selector. Example:

.entry {
  ...

  &-info {
    display: none;

    ^&.is-selected & {
      display: block;
    }
  }
}

outputs:

.entry {
  ...
}

.entry-info {
   display: none;
}

.entry.is-selected .entry-info {
  display: block;
}

I think it's nice.. :)

And this is the order which I require plugins in:

require('postcss-nested-ancestors'),
require('postcss-partial-import'),
require('postcss-mixins'),
require('postcss-advanced-variables'),
require('postcss-custom-media'),
require('postcss-media-minmax'),
require('postcss-color-function'),
require('postcss-extend'),
require('postcss-nested'),
require('postcss-property-lookup'),
require('postcss-selector-matches'),
require('postcss-selector-not'),

Should I make a PR?

from vuepack.

egoist avatar egoist commented on September 27, 2024

I just realized I did't use any postcss plugin specified syntax in the CSS, maybe we can simply remove precss and let user choose what plugins they want.

from vuepack.

dodas avatar dodas commented on September 27, 2024

Yup, that would probably be nicest way.

from vuepack.

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.