Skip to content

Commit 6388934

Browse files
committed
Update readme
1 parent e8d2b9e commit 6388934

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Missing CSS support for HTML documents.
88
- Id attribute completion.
99
- Supports Zen Coding completion for class and id attributes.
1010
- Scans workspace folder for css files.
11+
- Supports remote css files.
1112
- Uses [vscode-css-languageservice](https://github.com/Microsoft/vscode-css-languageservice).
1213

1314
## Supported Languages
@@ -21,6 +22,16 @@ Missing CSS support for HTML documents.
2122
- handlebars
2223
- php
2324

25+
## Remote Style Sheets
26+
27+
Remote style sheets can be specified in VS Code settings:
28+
29+
```
30+
"css.remoteStyleSheets": [
31+
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
32+
]
33+
```
34+
2435
## Installation
2536

2637
[Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css)

src/extension.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function parseRemote(url: string) {
138138
function parseRemoteConfig() {
139139
let remoteCssConfig = vsc.workspace.getConfiguration('css');
140140
let urls = remoteCssConfig.get('remoteStyleSheets') as string[];
141-
urls.forEach(url => parseRemote(url));
141+
urls.forEach((url) => parseRemote(url));
142142
}
143143

144144
export function activate(context: vsc.ExtensionContext) {
@@ -194,9 +194,7 @@ export function activate(context: vsc.ExtensionContext) {
194194
context.subscriptions.push(vsc.languages.setLanguageConfiguration('jade', { wordPattern: wp }));
195195
context.subscriptions.push(vsc.languages.setLanguageConfiguration('handlebars', { wordPattern: wp }));
196196
context.subscriptions.push(vsc.languages.setLanguageConfiguration('php', { wordPattern: wp }));
197-
context.subscriptions.push(vsc.workspace.onDidChangeConfiguration(e => {
198-
parseRemoteConfig();
199-
}));
197+
context.subscriptions.push(vsc.workspace.onDidChangeConfiguration((e) => parseRemoteConfig()));
200198
}
201199

202200
export function deactivate() {

test/test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<a href="#" id="internal_id" style="
2626
color: white;
2727
background-color: red;" class="
28-
external
28+
external container
2929
internal
3030
">TEST</a>
3131
</body>

0 commit comments

Comments
 (0)