Sublime Text package for CSS3 syntax highlighting.
- Total 46K
- Win 30K
- OS X 11K
- Linux 5K
|Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10||Feb 9||Feb 8||Feb 7||Feb 6||Feb 5||Feb 4||Feb 3||Feb 2||Feb 1|
Announcement: For ST3 users, this package has been replaced by CSS3. This package will be removed some time after Sublime Text 3 is released.
- Comprehensive: near complete support for CSS3, based on the latest draft specs, support for many vendor-prefixed CSS extensions (e.g. -moz-, -ms-, -webkit-)
- Forward-looking: support for upcoming features like variables, CSS animation, and @supports
- Modern: deprecated or obsolete parts of CSS are flagged as such
- Faithful: extremely close adherence to the W3C specification, with minor deviations due to technical limitations (for non-trivial deviations read below)
- Install Package Control
cmd+shift+p→ Package Control: Install Package → CSS3 Syntax
ctrl+shift+p→ Package Control: Install Package → CSS3 Syntax
After you've installed the plugin, open any CSS file and set the syntax to CSS.
cmd+shift+p → Set Syntax: CSS3
ctrl+shift+p → Set Syntax: CSS3
Set CSS3 Syntax as Default
- WARNING: This may break extensions that only recognize the default CSS syntax, such as Autoprefixr. A workaround, shown here, is to switch the syntax back to CSS when you want to run Autoprefixr.
- Open a CSS file in Sublime Text
- Navigate to View → Syntax → Open all with current extension as… → CSS3
After these steps, any CSS file you open in the future will be highlighted using CSS3 Syntax.
- No support for the following prefixes
- Incomplete support for vendor-prefixed CSS extensions (we're adding more as we find them)
Deviations from the Spec
All Properties Must End with a Semicolon
CSS doesn't require this, but it's a good practice. Semicolons help the highlighter distinguish properties and values. Without a semicolon, the highlighting could be off.
All Properties Must be Written in Lowercase
The spec says that HTML tags, properties, values, function names, and more should be matched case-insenstively. However, this syntax highlighter only matches lowercase text. If this bothers enough people, we can work to include matching uppercase text as well.