Git Product home page Git Product logo

postcss-antd-fixes's Introduction

postcss-antd-fixes

NPM version Download monthly

PostCSS plugin tries to fix all issues about antd with any others global CSS reset

Features

Usage

// postcss.config.js
module.exports = {
  plugins: {
    'tailwindcss': {},
    'autoprefixer': {},
    'postcss-antd-fixes': {
      // Support multiple prefixes, if you do not custom antd class name prefix, it's not necessary option.
      prefixes: ['vp-antd', 'ant'],
    },
  },
}

Transforms

Transform button styles

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/* => */

button:where(:not([class^='ant'])),
[type='button']:where(:not([class^='ant'])),
[type='reset']:where(:not([class^='ant'])),
[type='submit']:where(:not([class^='ant'])) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

Add anchor styles

:where([class^='ant']) a {
  /* colorPrimary */
  color: #1677ff;
  text-decoration: none;
}

Build & Publish

  • npm run build
  • npx changeset
  • npx changeset version
  • git commit
  • npx changeset publish
  • git push --follow-tags

changeset prerelease doc

License

MIT License © 2023 Yuns

postcss-antd-fixes's People

Contributors

yunsii avatar

Stargazers

 avatar victor.webdev avatar Huy Anh .B avatar 溶度积Ksp avatar  avatar Eephone Xu avatar bobi avatar tomchuk avatar JA avatar Amit avatar holycrypto avatar Kinght avatar Andry Pebrianto avatar  avatar zhou-yg avatar KIWI avatar YC.W avatar SedationH avatar Hayden Chen avatar Desmond L. avatar GEARLESS JOE avatar Vinicius Zaniboni Chagas avatar Damien avatar chenbin li avatar Simon Liang avatar John Söderberg avatar Tom Planer avatar  avatar

Watchers

 avatar

postcss-antd-fixes's Issues

Thank you.

Very helpful package. Thank you for building and sharing it.

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.