Skip to content

Commit 0faeb3f

Browse files
committed
Back port fixes to ST3 branch
1 parent dbe8ebd commit 0faeb3f

File tree

4 files changed

+49
-67
lines changed

4 files changed

+49
-67
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: deploy
33
on:
44
push:
55
tags:
6-
- 'st3-*'
6+
- 'st4-*'
77

88
jobs:
99

CHANGES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# ColorHelper
22

3+
## 6.7.0
4+
5+
- **NEW**: Rework HTML, CSS, SCSS, SASS handling. As syntax packages
6+
have evolved, rework rules to better target colors, combining
7+
handling under one rule `HTML/CSS`.
8+
- **NEW**: Move handling for old, CSS3 syntax to its own rule.
9+
10+
## 6.4.6
11+
12+
Fixes backported to Python 3.3, Sublime Text <= 4200.
13+
14+
- **NEW**: Rework HTML, CSS, SCSS, SASS handling. As syntax packages
15+
have evolved, rework rules to better target colors, combining
16+
handling under one rule `HTML/CSS`.
17+
- **NEW**: Move handling for old, CSS3 syntax to its own rule.
18+
319
## 6.4.5
420

521
- **FIX**: Fix SCSS support.

color_helper.sublime-settings

Lines changed: 31 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -339,23 +339,45 @@
339339
//
340340
//.- `enable`: This can be used to disable a color rule entirely. Defaults to `true`.
341341
"color_rules": [
342+
{
343+
"name": "CSS3",
344+
"base_scopes": [
345+
"source.css"
346+
],
347+
"syntax_files": [
348+
"CSS3/CSS3"
349+
],
350+
"color_class": "css-level-4",
351+
"scanning": [
352+
// https://packagecontrol.io/packages/CSS3
353+
"support.constant.color.w3c-color-name.css",
354+
"support.function.color-adjuster-rgb.css",
355+
"constant.other.color.rgb-value.css",
356+
"support.function.color.css",
357+
"support.function.rgba.css",
358+
"support.function.hsla.css",
359+
"support.function.hwb.css",
360+
"support.function.lab.css",
361+
"support.function.lch.css"
362+
]
363+
},
342364
{
343365
"name": "HTML/CSS",
344366
"base_scopes": [
345367
"source.css",
368+
"source.sass",
369+
"source.scss",
346370
"text.html"
347371
],
348372
"color_class": "css-level-4",
349373
"scanning": [
350-
// https://packagecontrol.io/packages/CSS3
351-
"meta.declaration-list.css -support.type.property-name.css -comment -string",
352-
// CSS, CSS in HTML etc. (based on: Sublime Default)
353-
"meta.property-value.css -comment -string",
354-
// CSS3, CSS3 in HTML etc. (based on: https://packagecontrol.io/packages/CSS3)
355-
"meta.value.css -comment -string",
356-
// HTML attributes (based on: Sublime Default)
357-
"meta.tag.inline.any.html string.quoted -constant.character.entity.html",
358-
"meta.tag.any.html meta.attribute-with-value.style.html"
374+
// Sublime default CSS nand HTML. Covers SCSS, POSTCSS, and most of SASS
375+
"support.constant.color.w3c.standard.css",
376+
"support.constant.color.w3c.extended.css",
377+
"support.function.color.css",
378+
"constant.other.color.rgb-value.css, constant.other.color.rgba-value.css",
379+
// https://packagecontrol.io/packages/SASS
380+
"support.function.custom.sass"
359381
]
360382
},
361383
{
@@ -411,62 +433,6 @@
411433
"meta.css.sublime-color-scheme meta.property-value.css -comment -string.quoted.single.css -string.quoted.double.css"
412434
]
413435
},
414-
{
415-
// Sass (based on: https://packagecontrol.io/packages/Sass)
416-
"name": "Sass",
417-
"syntax_files": ["Sass/Syntaxes/Sass", "Sass/Syntaxes/SCSS"],
418-
"base_scopes": [
419-
"source.sass",
420-
"source.scss"
421-
],
422-
"color_class": "css-level-4",
423-
"scanning": [
424-
"source.sass meta.property-value.css -comment -string -variable.declaration.sass",
425-
"source.scss meta.property-value.css -comment -string -variable.declaration.sass",
426-
"source.scss meta.declaration.value.scss -comment -string -variable.declaration.sass"
427-
]
428-
},
429-
{
430-
// SCSS (based on https://packagecontrol.io/packages/SCSS)
431-
"name": "SCSS",
432-
"syntax_files": ["SCSS/SCSS"],
433-
"base_scopes": [
434-
"source.scss"
435-
],
436-
"color_class": "css-level-4",
437-
"scanning": [
438-
"source.scss -comment -string"
439-
]
440-
},
441-
{
442-
// SCSS (based on https://packagecontrol.io/packages/Syntax%20Highlighting%20for%20Sass)
443-
"name": "Syntax Highlighting for Sass",
444-
"syntax_files": [
445-
"Syntax Highlighting for Sass/Syntaxes/SCSS",
446-
"Syntax Highlighting for Sass/Syntaxes/Sass"
447-
],
448-
"base_scopes": [
449-
"source.scss",
450-
"source.sass"
451-
],
452-
"color_class": "css-level-4",
453-
"scanning": [
454-
"source.scss -comment -string -support.type.property-name -variable.declaration",
455-
"source.sass -comment -string -support.type.property-name -variable.declaration"
456-
]
457-
},
458-
{
459-
// Sass (based on: https://packagecontrol.io/packages/Syntax%20Highlighting%20for%20PostCSS)
460-
"name": "PostCSS",
461-
"syntax_files": ["Syntax Highlighting for PostCSS/Syntaxes/PostCSS"],
462-
"base_scopes": [
463-
"source.postcss"
464-
],
465-
"color_class": "css-level-4",
466-
"scanning": [
467-
"source.postcss meta.property-list.css.postcss -comment -string"
468-
]
469-
},
470436
{
471437
"name": "tmTheme",
472438
"color_trigger": "(?i)(?:\\b(?<![-#&$])[\\w]{3,}(?![(-])\\b|(?!<&)\\#)",

support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import webbrowser
66
import re
77

8-
__version__ = "6.4.5"
8+
__version__ = "6.4.6"
99
__pc_name__ = 'ColorHelper'
1010

1111
CSS = '''

0 commit comments

Comments
 (0)