Skip to content

v4 - broken 1/2 completions #1178

@alexchexes

Description

@alexchexes

What version of VS Code are you using?

1.96.4

What version of Tailwind CSS IntelliSense are you using?

0.14.3

What version of Tailwind CSS are you using?

4.0.4

What package manager are you using?

pnpm

What operating system are you using?

Windows 11

Tailwind config

import defaultTheme from 'tailwindcss/defaultTheme'
import plugin from 'tailwindcss/plugin'

/** @type {import('tailwindcss').Config} */
export default {
  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  theme: {
    extend: {
      fontFamily: {
        'sans': ['Roboto', ...defaultTheme.fontFamily.sans],
      },
    },
  },
  plugins: [
    plugin(function ({ addBase }) {
      addBase({
        'html': { fontSize: '15px' },
      })
    }),
  ],
}

VS Code settings

{
  "tailwindCSS.rootFontSize": 15,
  "tailwindCSS.classAttributes": ["class", "className", "ngClass", "class:list", "mainWrapClass"]
}

and

  "files.associations": {
    "*.css": "tailwindcss"
  },
  "editor.quickSuggestions": {
    "strings": "on"
  },
  "tailwindCSS.experimental.classRegex": [
    [
      "[\\w-]+Class\\s*?=\\s*\"([\\s\\S]+?\")", // Container pattern
      "['`]*(.+?)['\"`]" // Class pattern
    ]
  ],

Reproduction URL

Just try typing translate1/2 in the current https://play.tailwindcss.com/

Describe your issue

After updating to v4, completions for things like translate-1/2 no longer appear. See screenshots:

Before (with v3):

Image

Image

After (with v4):

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions