* move `preflight` tests to `plugins` test folder * move `container` tests to `plugins` test folder * add a test that ensures that all built-in plugins have tests This is based on a few assumptions: 1. All plugins exist in the `corePlugins.js` file and are exported as `corePlugins` 2. Each exported plugin in that object has a file with a corresponding name in the current (`tests/plugins/`) folder * add dedicated plugin tests in the `plugins` folder * add a test that ensures that all built-in variant plugins have tests This is based on a few assumptions: 1. All variant plugins exist in the `corePlugins.js` file and are exported as `variantPlugins` 2. Each exported plugin in that object has a file with a corresponding name in the current (`tests/plugins/variants/`) folder * add dedicated variant plugin tests in the `plugins/variants` folder * cleanup basic usage test * move existing animation tests to animation plugin tests * move `apply-important-selector` tests to more appropriate location
61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
import { css, quickPluginTest } from '../util/run'
|
|
|
|
quickPluginTest('divideOpacity', {
|
|
safelist: [
|
|
// Arbitrary values
|
|
'divide-opacity-[0.12]',
|
|
'divide-opacity-[var(--my-value)]',
|
|
],
|
|
}).toMatchFormattedCss(css`
|
|
.divide-opacity-0 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0;
|
|
}
|
|
.divide-opacity-10 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.1;
|
|
}
|
|
.divide-opacity-100 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 1;
|
|
}
|
|
.divide-opacity-20 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.2;
|
|
}
|
|
.divide-opacity-25 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.25;
|
|
}
|
|
.divide-opacity-30 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.3;
|
|
}
|
|
.divide-opacity-40 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.4;
|
|
}
|
|
.divide-opacity-5 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.05;
|
|
}
|
|
.divide-opacity-50 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.5;
|
|
}
|
|
.divide-opacity-60 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.6;
|
|
}
|
|
.divide-opacity-70 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.7;
|
|
}
|
|
.divide-opacity-75 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.75;
|
|
}
|
|
.divide-opacity-80 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.8;
|
|
}
|
|
.divide-opacity-90 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.9;
|
|
}
|
|
.divide-opacity-95 > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.95;
|
|
}
|
|
.divide-opacity-\[0\.12\] > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: 0.12;
|
|
}
|
|
.divide-opacity-\[var\(--my-value\)\] > :not([hidden]) ~ :not([hidden]) {
|
|
--tw-divide-opacity: var(--my-value);
|
|
}
|
|
`)
|