Skip to content

Releases: Roman86/tailwindcss-scoped-preflight

v3.2.6

07 May 11:46
Compare
Choose a tag to compare

v3.2.5

15 Apr 21:10
Compare
Choose a tag to compare
3.2.5

v3.2.4

15 Apr 16:16
Compare
Choose a tag to compare
3.2.4

v3.2.3

08 Apr 21:33
Compare
Choose a tag to compare
3.2.3

v3.2.2

08 Apr 21:17
Compare
Choose a tag to compare
3.2.2

v3.2.1

08 Apr 21:15
Compare
Choose a tag to compare
3.2.1

v3.2.0

28 Mar 02:43
Compare
Choose a tag to compare

modifyPreflightStyles alternative/object syntax

scopedPreflightStyles({
  isolationStrategy: isolateForComponents('.comp'), // whatever
  modifyPreflightStyles: {
    html: {
      // removes the line-height for the html selector
      'line-height': null,
      // changes the font-family
      'font-family': '"Open Sans", sans-serif',
    },
    body: {
      // replaces the margin value for the body selector in preflight styles
      margin: '0 4px',
      // following won't have any effect as this property is not in the preflight styles
      color: 'red',
    },
  },
})

v3.1.0

27 Mar 23:57
Compare
Choose a tag to compare

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;
        }
      },
    }),
  ],
};

v1.0.3

12 Sep 11:59
Compare
Choose a tag to compare

Full Changelog: v1.0.1...v1.0.3

v1.0.1

12 Sep 11:40
Compare
Choose a tag to compare
feat: initial commit