Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote experimental and future features to default/stable (attempt #2) #2609

Merged
merged 21 commits into from Oct 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,021 changes: 958 additions & 63 deletions __tests__/applyAtRule.test.js

Large diffs are not rendered by default.

1,144 changes: 0 additions & 1,144 deletions __tests__/applyComplexClasses.test.js

This file was deleted.

22 changes: 3 additions & 19 deletions __tests__/darkMode.test.js
Expand Up @@ -3,26 +3,10 @@ import tailwind from '../src/index'
import createPlugin from '../src/util/createPlugin'

function run(input, config = {}) {
return postcss([tailwind({ experimental: { darkModeVariant: true }, ...config })]).process(
input,
{ from: undefined }
)
return postcss([tailwind(config)]).process(input, { from: undefined })
}

test('dark mode variants cannot be generated without enabling the dark mode experiment', () => {
const input = `
@variants dark {
.text-red {
color: red;
}
}
`

expect.assertions(1)
return expect(run(input, { experimental: {} })).rejects.toThrow()
})

test('user-defined dark mode variants do not stack when the dark mode experiment is disabled', () => {
test('user-defined dark mode variants do not stack', () => {
const input = `
@variants dark, hover {
.text-red {
Expand Down Expand Up @@ -53,7 +37,7 @@ test('user-defined dark mode variants do not stack when the dark mode experiment

expect.assertions(2)

return postcss([tailwind({ experimental: { darkModeVariant: false }, plugins: [userPlugin] })])
return postcss([tailwind({ plugins: [userPlugin] })])
.process(input, { from: undefined })
.then((result) => {
expect(result.css).toMatchCss(expected)
Expand Down
6 changes: 3 additions & 3 deletions __tests__/fixtures/tailwind-input-import.css
@@ -1,12 +1,12 @@
@import "tailwindcss/base";
@import 'tailwindcss/base';

@import 'tailwindcss/components';

@import "tailwindcss/utilities";
@import 'tailwindcss/utilities';

@responsive {
.example {
@apply .font-bold;
@apply font-bold;
color: theme('colors.red.500');
}
}