• Stars
    star
    246
  • Rank 161,375 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿซ Visual Studio Code extension that provides CSS class name completion for the HTML class attribute based on the CSS files in your workspace

IntelliSense for CSS class names in HTML

A Visual Studio Code extension that provides CSS class name completion for the HTML class attribute based on the definitions found in your workspace or external files referenced through the link element.

Features

  • Gives you autocompletion for CSS class definitions that can be found in your workspace (defined in CSS files or the in the file types listed in the Supported Language Modes section);
  • Supports external stylesheets referenced through link elements in HTML files;
  • Command to manually re-cache the class definitions used in the autocompletion;
  • User Settings to override which folders and files should be considered or excluded from the caching process.

Supported Language Modes

  • HTML
  • Razor
  • PHP
  • Laravel (Blade)
  • JavaScript
  • JavaScript React (.jsx)
  • TypeScript React (.tsx)
  • Vue (.vue) [requires octref.vetur]
  • Twig
  • Markdown (.md)
  • Embedded Ruby (.html.erb) [requires rebornix.Ruby]
  • Handlebars
  • EJS (.ejs)
  • Django template (django-html)

Extended Support for Other Language Modes

It's possible to specify which language modes will have autocompletion. There are three settings for this feature:

  • html-css-class-completion.HTMLLanguages is for language modes based on HTML, the ones you have the class attribute;
  • html-css-class-completion.CSSLanguages currently is for languages like CSS, Sass and Scss, this one is not very useful right now because it only supports the @apply function;
  • html-css-class-completion.JavaScriptLanguages is for JavaScript based languages supporting the class or className attribute.

The language modes listed in the previous section are already defined as default values in these settings, and you can add new ones or remove the already defined ones as necessary.

Specific Support

  • "@apply" directive in CSS, SASS and SCSS Files for Tailwind CSS;
  • "className" and "class" in TypeScript React, JavaScript and JavaScript React language modes;
  • Emmet abbreviations support triggered by typing a "." (comes disabled by default, check the User Settings topic for more information).

Contributions

You can request new features and contribute to the extension development on its repository on GitHub. Look for an issue you're interested in working on, comment on it to let me know you're working on it and submit your pull request! :D

What's new in version 1.20 (Dec 19, 2020)

  • Settings to allow users to specify which language modes will have autocompletion;
  • Fix interpretation of classes defined inside media queries.

Check out the changelog for the current and previous updates.

Usage

If there are HTML or JS files on your workspace, the extension automatically starts and looks for CSS class definitions. In case new CSS classes are defined, or new CSS files are added to the workspace, and you also want auto-completion for them, just hit the lightning icon on the status bar. Also, you can execute the command by pressing Ctrl+Shift+P(Cmd+Shift+P for Mac) and then typing "Cache CSS class definitions."

More User Settings

The extension supports a few user settings, changes to these settings will be automatically recognized and the caching process will be re-executed.

Folders and Files

You can change the folders and files the extension will consider or exclude during the caching process by setting the following user settings:

  • "html-css-class-completion.includeGlobPattern" (default: "**/*.{css,html}")
  • "html-css-class-completion.excludeGlobPattern" (default: "")

Emmet

Emmet support comes disabled by default, the reason behind this choice is because it the current implementation simply triggers completion when you type a "." (period) and this behavior might be considered a little annoying, but it might change in the future.

Currently it supports the following languages (those are language identifier): "html", "razor", "php", "blade", "vue", "twig", "markdown", "erb", "handlebars", "ejs", "typescriptreact", "javascript", "javascriptreact".

  • "html-css-class-completion.enableEmmetSupport" (default: false)

More Repositories

1

errors

๐Ÿผ An errors package that will help you handle them gracefully. It allows you to add contextual information to your errors, to wrap them and they even get a stack trace.
Go
8
star
2

telegram-media-downloader

Python
8
star
3

FunWithSignalR

An example of how to use SignalR to build a chat application with ASP.NET MVC
JavaScript
8
star
4

wait-group-promise

๐Ÿ”ฉ An implementation of the Go's WaitGroup for Node.js
JavaScript
7
star
5

xlsx

๐Ÿ“Š Create XLSX files incrementally, writing them to disk in order to avoid high memory usage
Go
6
star
6

demo-magician-errors

๐ŸŽช A quick demonstration of the new error related features available as of Go 1.13
Go
3
star
7

ZigForum

A forum web application written in AngularJS and ASP.NET Web API
CSS
3
star
8

LetMeReadIt

Windows 10 Mobile application that allows you to cache web pages so you can read then later
C#
2
star
9

widgets-api

Go
1
star
10

fun-with-webhooks

JavaScript
1
star
11

FunWithAngularJSWebAPICRUDProducts

An example of how to use AngularJS + ASP.NET MVC + ASP.NET Web API to build a simple CRUD web application (authentication with OAuth 2)
C#
1
star
12

InitialMachineSetupWithChocolatey

Initial machine setup with Chocolatey
PowerShell
1
star
13

mackrpg

A text-based game in Python which parses the story from a YAML file
Python
1
star
14

WeaponInformationSystem

Garry's Mod Addon that displays information about weapons and ammo on the ground
Lua
1
star
15

pokemon-card-generator

Go
1
star
16

amqpgrus

Logrus hook for AMQP
Go
1
star
17

mackenzie-what-comes-in-goes-out

What comes in, goes out! is an educational game that aims at teaching kids the importance of properly going to the bathroom for themselves and basic hygiene
Python
1
star