tailwindcss/tests/plugins/placeholderColor.test.js

44 lines
836 B
JavaScript
Raw Permalink Normal View History

import { quickPluginTest } from '../util/run'
quickPluginTest('placeholderColor', {
safelist: [
// Arbitrary values
'placeholder-[#0088cc]',
'placeholder-[var(--my-value)]',
],
theme: {
colors: {
transparent: 'transparent',
black: '#000',
red: {
100: '#fee2e2',
200: '#fecaca',
},
},
},
}).toMatchSnapshot()
// With `placeholderOpacity` enabled
quickPluginTest('placeholderColor', {
safelist: [
// Arbitrary values
'placeholder-[#0088cc]',
'placeholder-[var(--my-value)]',
],
corePlugins: ['placeholderOpacity'],
theme: {
colors: {
transparent: 'transparent',
black: '#000',
red: {
100: '#fee2e2',
200: '#fecaca',
},
},
opacity: {
0: '0',
50: '.5',
},
},
}).toMatchSnapshot()