postcss-style-fixes
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

postcss-style-fixes

NPM version Download monthly

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

Features

Usage

npm install postcss-style-fixes --save-dev
// postcss.config.js
module.exports = {
  plugins: {
    'tailwindcss': {},
    'autoprefixer': {},
    'postcss-style-fixes': {
      // Support multiple prefixes, if you do not custom antd class name prefix, it's not necessary option.
      prefixes: ['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

Package Sidebar

Install

npm i postcss-style-fixes

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

19.1 kB

Total Files

19

Last publish

Collaborators

  • liusixin