File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
- Sort arbitrary properties alphabetically across multiple class lists ([ #12911 ] ( https://github.com/tailwindlabs/tailwindcss/pull/12911 ) )
16
16
- Add ` mix-blend-plus-darker ` utility ([ #12923 ] ( https://github.com/tailwindlabs/tailwindcss/pull/12923 ) )
17
17
- Ensure dashes are allowed in variant modifiers ([ #13303 ] ( https://github.com/tailwindlabs/tailwindcss/pull/13303 ) )
18
+ - Fix crash showing completions in Intellisense when using a custom separator ([ #13306 ] ( https://github.com/tailwindlabs/tailwindcss/pull/13306 ) )
18
19
19
20
## [ 3.4.1] - 2024-01-05
20
21
Original file line number Diff line number Diff line change @@ -1044,6 +1044,11 @@ function registerPlugins(plugins, context) {
1044
1044
1045
1045
// Generate a list of available variants with meta information of the type of variant.
1046
1046
context . getVariants = function getVariants ( ) {
1047
+ // We use a unique, random ID for candidate names to avoid conflicts
1048
+ // We can't use characters like `_`, `:`, `@` or `.` because they might
1049
+ // be used as a separator
1050
+ let id = Math . random ( ) . toString ( 36 ) . substring ( 7 ) . toUpperCase ( )
1051
+
1047
1052
let result = [ ]
1048
1053
for ( let [ name , options ] of context . variantOptions . entries ( ) ) {
1049
1054
if ( options . variantInfo === VARIANT_INFO . Base ) continue
@@ -1054,7 +1059,7 @@ function registerPlugins(plugins, context) {
1054
1059
values : Object . keys ( options . values ?? { } ) ,
1055
1060
hasDash : name !== '@' ,
1056
1061
selectors ( { modifier, value } = { } ) {
1057
- let candidate = '__TAILWIND_PLACEHOLDER__'
1062
+ let candidate = `TAILWINDPLACEHOLDER ${ id } `
1058
1063
1059
1064
let rule = postcss . rule ( { selector : `.${ candidate } ` } )
1060
1065
let container = postcss . root ( { nodes : [ rule . clone ( ) ] } )
You can’t perform that action at this time.
0 commit comments