Skip to content

v3.1.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Mar 23:57
· 67 commits to main since this release

modifyPreflightStyles option added (function syntax)

/** @type {import("tailwindcss").Config} */
const config = {
  // ... your Tailwind CSS config
  plugins: [
    // ... other plugins
    scopedPreflightStyles({
      isolationStrategy: ...
      modifyPreflightStyles: ({ selectorSet, property, value }) => {
        // let's say you want to override the font family
        if (property === 'font-family' && value !== 'inherit') {
          return '"Open Sans", sans-serif';
        }
        // if you want to remove some property - return null
        if (selectorSet.has('html') && property === 'line-height') {
          return null;
        }
      },
    }),
  ],
};