Skip to content

Commit 46a3300

Browse files
add version and license (#3255)
* add current version & license * generate fixtures * update changelog Co-authored-by: Adam Wathan <[email protected]>
1 parent adfb49e commit 46a3300

6 files changed

+18
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- Add version comment to Preflight ([#3255](https://github.com/tailwindlabs/tailwindcss/pull/3255))
1011
- Ensure sourcemap input is deterministic when using `@apply` in Vue components ([#3356](https://github.com/tailwindlabs/tailwindcss/pull/3356))
1112
- Ensure placeholder opacity is consistent across browsers ([#3308](https://github.com/tailwindlabs/tailwindcss/pull/3308))
1213
- Add `cursor-help` by default ([#3199](https://github.com/tailwindlabs/tailwindcss/pull/3199))

__tests__/fixtures/tailwind-output-flagged.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/*! tailwindcss v2.0.2 | MIT License | https://tailwindcss.com */
2+
13
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
24

35
/*

__tests__/fixtures/tailwind-output-important.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/*! tailwindcss v2.0.2 | MIT License | https://tailwindcss.com */
2+
13
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
24

35
/*

__tests__/fixtures/tailwind-output-no-color-opacity.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/*! tailwindcss v2.0.2 | MIT License | https://tailwindcss.com */
2+
13
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
24

35
/*

__tests__/fixtures/tailwind-output.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/*! tailwindcss v2.0.2 | MIT License | https://tailwindcss.com */
2+
13
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
24

35
/*

src/plugins/preflight.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
import fs from 'fs'
22
import postcss from 'postcss'
3+
import packageJson from '../../package.json'
34

45
export default function () {
56
return function ({ addBase }) {
67
const normalizeStyles = postcss.parse(
78
fs.readFileSync(require.resolve('modern-normalize'), 'utf8')
89
)
910
const preflightStyles = postcss.parse(fs.readFileSync(`${__dirname}/css/preflight.css`, 'utf8'))
10-
addBase([...normalizeStyles.nodes, ...preflightStyles.nodes])
11+
12+
addBase([
13+
postcss.comment({
14+
text: `! tailwindcss v${packageJson.version} | MIT License | https://tailwindcss.com`,
15+
}),
16+
...normalizeStyles.nodes,
17+
...preflightStyles.nodes,
18+
])
1119
}
1220
}

0 commit comments

Comments
 (0)