Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,6 @@ export let variantPlugins = {
matchVariant(
name,
(value = '', extra) => {
if (extra.modifier) {
log.warn(`modifier-${name}-experimental`, [
`The ${name} variant modifier feature in Tailwind CSS is currently in preview.`,
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
])
}

let result = normalize(typeof value === 'function' ? value(extra) : value)
if (!result.includes('&')) result = '&' + result

Expand Down Expand Up @@ -309,19 +302,19 @@ export let variantPlugins = {
return (value) => {
if (!areSimpleScreens) {
log.warn('complex-screen-config', [
'The min and max variants are not supported with a screen configuration containing objects.',
'The `min-*` and `max-*` variants are not supported with a `screens` configuration containing objects.',
])

return []
} else if (!screensUseConsistentUnits) {
log.warn('mixed-screen-units', [
'The min and max variants are not supported with a screen configuration containing mixed units.',
'The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units.',
])

return []
} else if (typeof value === 'string' && !canUseUnits(value)) {
log.warn('minmax-have-mixed-units', [
'The min and max variants are not supported with a screen configuration containing mixed units.',
'The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units.',
])

return []
Expand Down
10 changes: 4 additions & 6 deletions src/lib/findAtConfigPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@ export function findAtConfigPath(root, result) {

if (relativeTo === null) {
throw rule.error(
'The `@config` at-rule cannot be used without a `from` option being set on the PostCSS config.'
'The `@config` directive cannot be used without setting `from` in your PostCSS config.'
)
}

if (configPath) {
throw rule.error('Only `@config` at-rule is allowed per file.')
throw rule.error('Only one `@config` directive is allowed per file.')
}

let matches = rule.params.match(/(['"])(.*?)\1/)
if (!matches) {
throw rule.error(
'The `@config` at-rule must be followed by a string containing the path to the config file.'
)
throw rule.error('A path is required when using the `@config` directive.')
}

let inputPath = matches[2]
if (path.isAbsolute(inputPath)) {
throw rule.error('The `@config` at-rule cannot be used with an absolute path.')
throw rule.error('The `@config` directive cannot be used with an absolute path.')
}

configPath = path.resolve(path.dirname(relativeTo), inputPath)
Expand Down