@benface/tailwindcss-reset
Advanced tools
Comparing version 2.1.0 to 3.0.0
@@ -8,8 +8,16 @@ # Changelog | ||
## [3.0.0] - 2022-06-29 | ||
### Changed | ||
- Updated for Tailwind 3.x | ||
## [2.1.0] - 2020-08-04 | ||
### Added | ||
- Added a rule to remove dotted outline in Firefox | ||
### Fixed | ||
- Fixed the bad `text-align` default for RTL languages (from `left` to `start`) | ||
@@ -20,2 +28,3 @@ | ||
### Added | ||
- Added a reset for `th`’s `font-weight` (from `bold` to `inherit`) and `text-align` (from `center` to `inherit`) | ||
@@ -26,5 +35,7 @@ | ||
### Changed | ||
- Changed to use Tailwind 1.2’s new plugin definition syntax | ||
### Removed | ||
- Removed the `background-position` and `background-repeat` declarations on `button` elements since Preflight doesn’t reset these properties anymore in Tailwind 1.2 | ||
@@ -35,2 +46,3 @@ | ||
### Fixed | ||
- Fixed the `background-position` and `background-repeat` resets on `button` elements (they weren’t taking effect due to a conflict with a Preflight rule) | ||
@@ -41,2 +53,3 @@ | ||
### Removed | ||
- Removed `hr`’s margin reset since it is now built into Tailwind | ||
@@ -48,3 +61,4 @@ | ||
[Unreleased]: https://github.com/benface/tailwindcss-reset/compare/v2.1.0...HEAD | ||
[unreleased]: https://github.com/benface/tailwindcss-reset/compare/v3.0.0...HEAD | ||
[3.0.0]: https://github.com/benface/tailwindcss-reset/compare/v2.1.0...v3.0.0 | ||
[2.1.0]: https://github.com/benface/tailwindcss-reset/compare/v2.0.1...v2.1.0 | ||
@@ -51,0 +65,0 @@ [2.0.1]: https://github.com/benface/tailwindcss-reset/compare/v2.0.0...v2.0.1 |
@@ -1,7 +0,6 @@ | ||
const plugin = require('tailwindcss/plugin'); | ||
const fs = require('fs'); | ||
const plugin = require("tailwindcss/plugin"); | ||
const fs = require("fs"); | ||
module.exports = plugin(function({ addBase, postcss }) { | ||
const resetStyles = postcss.parse(fs.readFileSync(`${__dirname}/reset.css`, 'utf8')); | ||
addBase(resetStyles.nodes); | ||
module.exports = plugin(function ({ addBase, postcss }) { | ||
addBase(postcss.parse(fs.readFileSync(`${__dirname}/reset.css`, "utf8"))); | ||
}); |
{ | ||
"name": "@benface/tailwindcss-reset", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "Opinionated CSS reset to apply on top of Tailwind CSS’s Preflight", | ||
@@ -14,10 +14,9 @@ "author": "Benoît Rouleau <benoit.rouleau@icloud.com>", | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"github-release-from-changelog": "^2.1.1", | ||
"jest": "^26.2.2", | ||
"jest": "^28.1.1", | ||
"jest-matcher-css": "^1.1.0", | ||
"release-it": "^13.6.6", | ||
"tailwindcss": "1.6.2" | ||
"release-it": "^15.1.1", | ||
"tailwindcss": "3.1.4" | ||
} | ||
} |
32
test.js
@@ -1,6 +0,6 @@ | ||
const cssMatcher = require('jest-matcher-css'); | ||
const postcss = require('postcss'); | ||
const tailwindcss = require('tailwindcss'); | ||
const fs = require('fs'); | ||
const resetPlugin = require('./index.js'); | ||
const cssMatcher = require("jest-matcher-css"); | ||
const postcss = require("postcss"); | ||
const tailwindcss = require("tailwindcss"); | ||
const fs = require("fs"); | ||
const resetPlugin = require("./index.js"); | ||
@@ -11,13 +11,11 @@ const generatePluginCss = () => { | ||
corePlugins: false, | ||
plugins: [ | ||
resetPlugin, | ||
], | ||
plugins: [resetPlugin], | ||
}) | ||
) | ||
.process('@tailwind base; @tailwind utilities; @tailwind components;', { | ||
from: undefined, | ||
}) | ||
.then(result => { | ||
return result.css; | ||
}); | ||
.process("@tailwind base; @tailwind utilities; @tailwind components;", { | ||
from: undefined, | ||
}) | ||
.then((result) => { | ||
return result.css; | ||
}); | ||
}; | ||
@@ -29,8 +27,8 @@ | ||
test('the plugin generates the expected CSS', () => { | ||
return generatePluginCss().then(css => { | ||
test("the plugin generates the expected CSS", () => { | ||
return generatePluginCss().then((css) => { | ||
expect(css).toMatchCss(` | ||
${fs.readFileSync(`${__dirname}/reset.css`, 'utf8')} | ||
${fs.readFileSync(`${__dirname}/reset.css`, "utf8")} | ||
`); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
8011
114