Tailwind CSS
Tailswind CSS syntax for Sublime Text
Details
Installs
- Total 13K
- Win 5K
- Mac 4K
- Linux 3K
Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 3 | 4 | 4 | 0 | 2 | 2 | 3 | 5 | 5 | 7 | 3 | 3 | 4 | 4 | 0 | 5 | 3 | 4 | 5 | 4 | 4 | 2 | 4 | 1 | 5 | 2 | 1 | 2 | 2 | 2 | 5 | 1 | 2 | 3 | 1 | 3 | 2 | 1 | 8 | 1 | 6 | 4 | 6 | 9 | 5 | 3 |
Mac | 2 | 3 | 4 | 3 | 2 | 1 | 1 | 2 | 5 | 5 | 3 | 1 | 4 | 1 | 4 | 2 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 2 | 1 | 2 | 4 | 2 | 2 | 4 | 4 | 1 | 3 | 3 | 2 | 1 | 4 | 4 | 4 | 2 | 3 | 2 | 4 | 4 | 3 | 4 |
Linux | 4 | 0 | 2 | 3 | 3 | 2 | 0 | 0 | 4 | 3 | 1 | 1 | 1 | 2 | 3 | 1 | 1 | 1 | 1 | 4 | 2 | 1 | 2 | 4 | 4 | 3 | 1 | 2 | 1 | 3 | 2 | 1 | 1 | 0 | 5 | 5 | 1 | 3 | 1 | 0 | 4 | 4 | 0 | 4 | 4 | 1 |
Readme
- Source
- raw.githubusercontent.com
Tailwind CSS
A Sublime Text CSS syntax extension with support for Tailwind CSS
Requires ST 4092 or higher.
Install
Package Control:
- Open
Command Palette
using menu itemTools → Command Palette
orCMD/CTRL
+SHIFT
+P
. - Choose
Package Control: Install Package
. - Type
Tailwind CSS
and pressENTER
.
Manually:
- Download latest release and unzip. it into your Packages folder.
- Go to
Sublime Text → Preferences → Browse Packages
. - Move folder to inside and rename the folder to
Tailwind CSS
.
Usage
CSS
This syntax is assigned to files which end with tailwind.css
by default.
To use it for ordinary *.css
files manual assignment is needed.
- Click onto the syntax name in the status bar
- Navigate to the sub menu
Open all with current extension as...
- Click on
Tailwind CSS
.
To add highlighting for Tailwind @-rules to CSS in a way they are also supported within component syntaxes like Svelte or VueJS…
- create a custom Packages/User/CSS (Tailwind).sublime-syntax
- paste the following content:
%YAML 1.2
---
name: CSS (Tailwind)
scope: source.css
version: 2
extends:
- Packages/Tailwind CSS/Tailwind CSS.sublime-syntax
[!WARNING]
By assigning
source.css
main scope original PostCSS syntax is augmented.
- Augmenting syntax must be loaded after CSS in order for this trick to work.
- Only a single augmenting syntax may exist.
- Syntaxes, which extend core CSS to add their own rules can't be augmented this way.
PostCSS
To add highlighting for Tailwind @-rules to PostCSS in a way they are also supported within component syntaxes like Svelte or VueJS…
- create a custom Packages/User/PostCSS (Tailwind).sublime-syntax
- paste the following content:
%YAML 1.2
---
name: PostCSS (Tailwind)
scope: source.postcss
version: 2
extends:
- Packages/Tailwind CSS/Tailwind CSS.sublime-syntax
# - ... maybe more additions
- Packages/PostCSS/PostCSS.sublime-syntax
[!WARNING]
By assigning
source.postcss
main scope original PostCSS syntax is augmented.
- Augmenting syntax must be loaded after PostCSS in order for this trick to work.
- Only a single augmenting syntax may exist.
[!NOTE]
requires: - Sublime Text build 4152+ - PostCSS 3.0.0+
SCSS
To add highlighting for Tailwind @-rules to SCSS in a way they are also supported within component syntaxes like Svelte or VueJS…
- create a custom Packages/User/SCSS (Tailwind).sublime-syntax
- paste the following content:
%YAML 1.2
---
name: SCSS (Tailwind)
scope: source.scss
version: 2
extends:
- Packages/Tailwind CSS/Tailwind CSS.sublime-syntax
# - ... maybe more additions
- Packages/Sass/Syntaxes/SCSS.sublime-syntax
[!WARNING]
By assigning
source.scss
main scope original PostCSS syntax is augmented.
- Augmenting syntax must be loaded after PostCSS in order for this trick to work.
- Only a single augmenting syntax may exist.
[!NOTE]
requires: - Sublime Text build 4152+ - Sass 4.0.0+
Related Extensions
Troubleshooting
Tailwind CSS extends Sublime Text's CSS syntax definitions.
If Tailwind CSS syntax highlighting doesn't work and console displays syntax errors in Tailwind CSS.sublime-syntax, please make sure to remove any out-dated syntax override.
Steps:
- call Menu > Preferences > Browse Packages..
- Look for CSS folders
- Remove it or at least delete any syntax definition in it.