Skip to content

Commit

Permalink
Prep for patch release (#8098)
Browse files Browse the repository at this point in the history
* Disable backdrop variant

* Disable enabled variant

* Disable border spacing utilities

* Disable text-start/end utilities

* Disable poll option in CLI

* Disable ring color default fn

* Disable dark mode class name customization

* Disable support for `Document` node types

* Disable rgb/hsl fns

* Update tests

* Temporarily disable type generation

* Update changelog
  • Loading branch information
thecrypticace authored Apr 12, 2022
1 parent c1ed8dd commit 57699a0
Show file tree
Hide file tree
Showing 23 changed files with 77 additions and 132 deletions.
14 changes: 0 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix generation of `div:not(.foo)` if `.foo` is never defined ([#7815](https://github.com/tailwindlabs/tailwindcss/pull/7815))
- Allow for custom properties in `rgb`, `rgba`, `hsl` and `hsla` colors ([#7933](https://github.com/tailwindlabs/tailwindcss/pull/7933))
- Remove autoprefixer as explicit peer-dependency to avoid invalid warnings in situations where it isn't actually needed ([#7949](https://github.com/tailwindlabs/tailwindcss/pull/7949))
- Types: allow for arbitrary theme values (for 3rd party plugins) ([#7926](https://github.com/tailwindlabs/tailwindcss/pull/7926))
- Ensure the `percentage` data type is validated correctly ([#8015](https://github.com/tailwindlabs/tailwindcss/pull/8015))

### Changed
Expand All @@ -31,19 +30,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replace `cosmiconfig` with `lilconfig` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6038))
- Update `cssnano` to avoid removing empty variables when minifying ([#7818](https://github.com/tailwindlabs/tailwindcss/pull/7818))

### Added

- Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587))
- Add `rgb` and `hsl` color helpers for CSS variables ([#7665](https://github.com/tailwindlabs/tailwindcss/pull/7665))
- Support PostCSS `Document` nodes ([#7291](https://github.com/tailwindlabs/tailwindcss/pull/7291))
- Add `text-start` and `text-end` utilities ([#6656](https://github.com/tailwindlabs/tailwindcss/pull/6656))
- Support customizing class name when using `darkMode: 'class'` ([#5800](https://github.com/tailwindlabs/tailwindcss/pull/5800))
- Add `--poll` option to the CLI ([#7725](https://github.com/tailwindlabs/tailwindcss/pull/7725))
- Add new `border-spacing` utilities ([#7102](https://github.com/tailwindlabs/tailwindcss/pull/7102))
- Add `enabled` variant ([#7905](https://github.com/tailwindlabs/tailwindcss/pull/7905))
- Add TypeScript types for the `tailwind.config.js` file ([#7891](https://github.com/tailwindlabs/tailwindcss/pull/7891))
- Add `backdrop` variant ([#7924](https://github.com/tailwindlabs/tailwindcss/pull/7924))

## [3.0.23] - 2022-02-16

### Fixed
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
"license": "MIT",
"main": "lib/index.js",
"types": "types/index.d.ts",
"repository": "https://github.com/tailwindlabs/tailwindcss.git",
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
"homepage": "https://tailwindcss.com",
Expand All @@ -26,7 +25,7 @@
"posttest": "npm run style",
"generate:plugin-list": "node -r @swc/register scripts/create-plugin-list.js",
"generate:types": "node -r @swc/register scripts/generate-types.js",
"generate": "npm run generate:plugin-list && npm run generate:types"
"generate": "npm run generate:plugin-list"
},
"files": [
"src/*",
Expand All @@ -36,8 +35,6 @@
"scripts/*.js",
"stubs/*.stub.js",
"nesting/*",
"types/**/*",
"*.d.ts",
"*.css",
"*.js"
],
Expand Down
7 changes: 7 additions & 0 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ let commands = {
'--input': { type: String, description: 'Input file' },
'--output': { type: String, description: 'Output file' },
'--watch': { type: Boolean, description: 'Watch for changes and rebuild as needed' },
/*
'--poll': {
type: Boolean,
description: 'Use polling instead of filesystem events when watching',
},
*/
'--content': {
type: String,
description: 'Content paths to use for removing unused classes',
Expand All @@ -195,7 +197,9 @@ let commands = {
'-o': '--output',
'-m': '--minify',
'-w': '--watch',
/*
'-p': '--poll',
*/
},
},
}
Expand Down Expand Up @@ -383,7 +387,10 @@ async function build() {
let input = args['--input']
let output = args['--output']
let shouldWatch = args['--watch']
let shouldPoll = false
/*
let shouldPoll = args['--poll']
*/
let shouldCoalesceWriteEvents = shouldPoll || process.platform === 'win32'
let includePostCss = args['--postcss']

Expand Down
14 changes: 14 additions & 0 deletions src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export let variantPlugins = {

addVariant('placeholder', '&::placeholder')

/*
addVariant('backdrop', '&::backdrop')
*/

addVariant('before', ({ container }) => {
container.walkRules((rule) => {
Expand Down Expand Up @@ -120,7 +122,9 @@ export let variantPlugins = {
'focus',
'focus-visible',
'active',
/*
'enabled',
*/
'disabled',
].map((variant) => (Array.isArray(variant) ? variant : [variant, `:${variant}`]))

Expand Down Expand Up @@ -187,7 +191,10 @@ export let variantPlugins = {
}

if (mode === 'class') {
addVariant('dark', `.dark &`)
/*
addVariant('dark', `${className} &`)
*/
} else if (mode === 'media') {
addVariant('dark', '@media (prefers-color-scheme: dark)')
}
Expand Down Expand Up @@ -532,6 +539,7 @@ export let corePlugins = {
})
},

/*
borderSpacing: ({ addDefaults, matchUtilities, theme }) => {
addDefaults('border-spacing', {
'--tw-border-spacing-x': 0,
Expand Down Expand Up @@ -566,6 +574,7 @@ export let corePlugins = {
{ values: theme('borderSpacing') }
)
},
*/

transformOrigin: createUtilityPlugin('transformOrigin', [['origin', ['transformOrigin']]]),
translate: createUtilityPlugin(
Expand Down Expand Up @@ -1562,8 +1571,10 @@ export let corePlugins = {
'.text-center': { 'text-align': 'center' },
'.text-right': { 'text-align': 'right' },
'.text-justify': { 'text-align': 'justify' },
/*
'.text-start': { 'text-align': 'start' },
'.text-end': { 'text-align': 'end' },
*/
})
},

Expand Down Expand Up @@ -1967,7 +1978,10 @@ export let corePlugins = {
ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme }) => {
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
let ringColorDefault = withAlphaValue(
/*
theme('ringColor')?.DEFAULT,
*/
theme('ringColor.DEFAULT'),
ringOpacityDefault,
`rgb(147 197 253 / ${ringOpacityDefault})`
)
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = function tailwindcss(configOrPath) {
function (root, result) {
let context = setupTrackingContext(configOrPath)

/*
if (root.type === 'document') {
let roots = root.nodes.filter((node) => node.type === 'root')
Expand All @@ -26,6 +27,7 @@ module.exports = function tailwindcss(configOrPath) {
return
}
*/

processTailwindFeatures(context)(root, result)
},
Expand Down
2 changes: 2 additions & 0 deletions src/util/resolveConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const configUtils = {
{}
)
},
/*
rgb(property) {
if (!property.startsWith('--')) {
throw new Error(
Expand Down Expand Up @@ -96,6 +97,7 @@ const configUtils = {
return `hsl(var(${property}) / ${opacityValue})`
}
},
*/
}

function value(valueToResolve, ...args) {
Expand Down
2 changes: 2 additions & 0 deletions stubs/defaultConfig.stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ module.exports = {
'3xl': '1.5rem',
full: '9999px',
},
/*
borderSpacing: ({ theme }) => ({
...theme('spacing'),
}),
*/
borderWidth: {
DEFAULT: '1px',
0: '0px',
Expand Down
86 changes: 42 additions & 44 deletions tests/__snapshots__/source-maps.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -268,50 +268,48 @@ Array [
"2:4-18 -> 368:2-15",
"2:18 -> 369:0",
"2:4 -> 371:0",
"2:4-18 -> 372:2-26",
"2:4-18 -> 373:2-26",
"2:4-18 -> 374:2-21",
"2:4-18 -> 375:2-21",
"2:4-18 -> 372:2-21",
"2:4-18 -> 373:2-21",
"2:4-18 -> 374:2-16",
"2:4-18 -> 375:2-16",
"2:4-18 -> 376:2-16",
"2:4-18 -> 377:2-16",
"2:4-18 -> 378:2-16",
"2:4-18 -> 379:2-17",
"2:4-18 -> 380:2-17",
"2:4-18 -> 381:2-15",
"2:4-18 -> 382:2-15",
"2:4-18 -> 383:2-20",
"2:4-18 -> 384:2-40",
"2:4-18 -> 385:2-17",
"2:4-18 -> 386:2-22",
"2:4-18 -> 387:2-24",
"2:4-18 -> 388:2-25",
"2:4-18 -> 389:2-26",
"2:4-18 -> 390:2-20",
"2:4-18 -> 391:2-29",
"2:4-18 -> 392:2-30",
"2:4-18 -> 393:2-40",
"2:4-18 -> 394:2-36",
"2:4-18 -> 395:2-29",
"2:4-18 -> 396:2-24",
"2:4-18 -> 397:2-32",
"2:4-18 -> 398:2-14",
"2:4-18 -> 399:2-20",
"2:4-18 -> 400:2-18",
"2:4-18 -> 401:2-19",
"2:4-18 -> 402:2-20",
"2:4-18 -> 403:2-16",
"2:4-18 -> 404:2-18",
"2:4-18 -> 405:2-15",
"2:4-18 -> 406:2-21",
"2:4-18 -> 407:2-23",
"2:4-18 -> 408:2-29",
"2:4-18 -> 409:2-27",
"2:4-18 -> 410:2-28",
"2:4-18 -> 411:2-29",
"2:4-18 -> 412:2-25",
"2:4-18 -> 413:2-26",
"2:4-18 -> 414:2-27",
"2:4 -> 415:2",
"2:18 -> 416:0",
"2:4-18 -> 377:2-17",
"2:4-18 -> 378:2-17",
"2:4-18 -> 379:2-15",
"2:4-18 -> 380:2-15",
"2:4-18 -> 381:2-20",
"2:4-18 -> 382:2-40",
"2:4-18 -> 383:2-17",
"2:4-18 -> 384:2-22",
"2:4-18 -> 385:2-24",
"2:4-18 -> 386:2-25",
"2:4-18 -> 387:2-26",
"2:4-18 -> 388:2-20",
"2:4-18 -> 389:2-29",
"2:4-18 -> 390:2-30",
"2:4-18 -> 391:2-40",
"2:4-18 -> 392:2-36",
"2:4-18 -> 393:2-29",
"2:4-18 -> 394:2-24",
"2:4-18 -> 395:2-32",
"2:4-18 -> 396:2-14",
"2:4-18 -> 397:2-20",
"2:4-18 -> 398:2-18",
"2:4-18 -> 399:2-19",
"2:4-18 -> 400:2-20",
"2:4-18 -> 401:2-16",
"2:4-18 -> 402:2-18",
"2:4-18 -> 403:2-15",
"2:4-18 -> 404:2-21",
"2:4-18 -> 405:2-23",
"2:4-18 -> 406:2-29",
"2:4-18 -> 407:2-27",
"2:4-18 -> 408:2-28",
"2:4-18 -> 409:2-29",
"2:4-18 -> 410:2-25",
"2:4-18 -> 411:2-26",
"2:4-18 -> 412:2-27",
"2:4 -> 413:2",
"2:18 -> 414:0",
]
`;
15 changes: 0 additions & 15 deletions tests/basic-usage.test.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
Expand Down Expand Up @@ -254,19 +252,6 @@
.border-collapse {
border-collapse: collapse;
}
.border-spacing-4 {
--tw-border-spacing-x: 1rem;
--tw-border-spacing-y: 1rem;
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
}
.border-spacing-x-6 {
--tw-border-spacing-x: 1.5rem;
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
}
.border-spacing-y-8 {
--tw-border-spacing-y: 2rem;
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
}
.origin-top-right {
transform-origin: top right;
}
Expand Down
4 changes: 1 addition & 3 deletions tests/basic-usage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ test('default ring color can be a function', () => {
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
Expand All @@ -173,7 +171,7 @@ test('default ring color can be a function', () => {
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgba(var(--red), 0.5);
--tw-ring-color: rgb(147 197 253 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
Expand Down
2 changes: 0 additions & 2 deletions tests/collapse-adjacent-rules.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
Expand Down
2 changes: 2 additions & 0 deletions tests/dark-mode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ it('should be possible to use the darkMode "class" mode', () => {
})
})

/*
it('should be possible to change the class name', () => {
let config = {
darkMode: ['class', '.test-dark'],
Expand All @@ -45,6 +46,7 @@ it('should be possible to change the class name', () => {
`)
})
})
*/

it('should be possible to use the darkMode "media" mode', () => {
let config = {
Expand Down
2 changes: 0 additions & 2 deletions tests/import-syntax.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ h1 {
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
Expand Down
2 changes: 0 additions & 2 deletions tests/important-boolean.test.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
Expand Down
2 changes: 0 additions & 2 deletions tests/important-modifier-prefix.test.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
*,
::before,
::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
Expand Down
Loading

0 comments on commit 57699a0

Please sign in to comment.