Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Tailwind CSS Highlight (pre v2 fork)New to Visual Studio Code? Get it now.
Tailwind CSS Highlight (pre v2 fork)

Tailwind CSS Highlight (pre v2 fork)

henrikvilhelmberglund

|
690 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This is a pre v2 fork of the Tailwind CSS Highlight extension.

Original readme below. (images probably broken)

Tailwind CSS Highlight

This extension highlights the utilities of TailwindCSS.

You can customize colors and regexes.

Installation

https://marketplace.visualstudio.com/items?itemName=ellreka.tailwindcss-highlight

Development

Please run debug mode on the vscode.

Configuration

tailwindcss-highlight.languages

List of languages to apply highlighting.

"tailwindcss-highlight.languages": [
  "html",
  "javascript",
  "javascriptreact",
  "typescript",
  "typescriptreact",
  "vue",
  "php",
  "svelte"
]

tailwindcss-highlight.configs

Configuration for highlighting utilities.

Name Description Type
enable Whether to highlight Boolean
regex Regular expression to match String
options Highlight styles DecorationRenderOptions
"tailwindcss-highlight.configs": {
  "padding": {
    "enable": true,
    "regex": "(?<=[:`'\"\\s])(|-)p(|t|b|r|l|x|y)-[^`'\"\\s]+",
    "options": {
      "color": "black",
      "backgroundColor": "rgba(187, 196, 136, 1)"
    }
  }
}

Customization example

Make it a underline instead of a highlight
"tailwindcss-highlight.configs": {
  "padding": {
    "enable": true,
    "regex": "(?<=[:`'\"\\s])(|-)p(|t|b|r|l|x|y)-[^`'\"\\s]+",
    "options": {
      "backgroundColor": "",
      "borderWidth": "0 0 3px 0",
      "borderStyle": "solid",
      "borderColor": "rgba(187, 196, 136, 1)",
      "color": "currentColor"
    }
  },
}

tailwindcss-highlight.variants

Configuration for highlighting variants.

Name Description Type
enable Whether to highlight Boolean
variants List of variant String[]
color Font color code String
"tailwindcss-highlight.configs": {
  "responsive": {
    "enable": true,
    "variants": [
      "sm",
      "md",
      "lg",
      "xl",
      "2xl"
    ],
    "color": "#51FFFF"
  },
}

Customization example

Change the color of the focus variants
"tailwindcss-highlight.configs": {
  "focus": {
    "enable": true,
    "variants": [
      "focus",
      "focus-within",
      "focus-visible"
    ],
    "color": "#FFB6C1"
  },
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft