Skip to content

Commit 84db333

Browse files
reininkadamwathan
andcommitted
Add warning about RTL features being in preview
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
1 parent cd5cb00 commit 84db333

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

src/corePlugins.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -237,24 +237,30 @@ export default {
237237
directionVariants: ({ config, addVariant }) => {
238238
addVariant(
239239
'ltr',
240-
transformAllSelectors(
241-
(selector) =>
242-
`[dir="ltr"] ${updateAllClasses(
243-
selector,
244-
(className) => `ltr${config('separator')}${className}`
245-
)}`
246-
)
240+
transformAllSelectors((selector) => {
241+
log.warn('rtl-experimental', [
242+
'The RTL features in Tailwind CSS are currently in preview.',
243+
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
244+
])
245+
return `[dir="ltr"] ${updateAllClasses(
246+
selector,
247+
(className) => `ltr${config('separator')}${className}`
248+
)}`
249+
})
247250
)
248251

249252
addVariant(
250253
'rtl',
251-
transformAllSelectors(
252-
(selector) =>
253-
`[dir="rtl"] ${updateAllClasses(
254-
selector,
255-
(className) => `rtl${config('separator')}${className}`
256-
)}`
257-
)
254+
transformAllSelectors((selector) => {
255+
log.warn('rtl-experimental', [
256+
'The RTL features in Tailwind CSS are currently in preview.',
257+
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
258+
])
259+
return `[dir="rtl"] ${updateAllClasses(
260+
selector,
261+
(className) => `rtl${config('separator')}${className}`
262+
)}`
263+
})
258264
)
259265
},
260266

0 commit comments

Comments
 (0)