GithubHelp home page GithubHelp logo

Comments (6)

deathaxe avatar deathaxe commented on June 10, 2024 2

Sure. The only current downside is your extended syntax not being used for embedded syntaxes in HTML/... nor by other extensions such as Less or (up-comming SCSS).

This would require #3416 or alternatively sublimehq/sublime_text#5004

from packages.

deathaxe avatar deathaxe commented on June 10, 2024 1

Predefined lists of known properties and/or values require significant maintanance efforts, especially in fast moving syntaxes such as CSS. That's not desirable.

from packages.

deathaxe avatar deathaxe commented on June 10, 2024 1

Fixed lists of property names had been removed some commits ago to simplify maintanance. Be it automatable or not. There are no plans to add those back.

from packages.

titoBouzout avatar titoBouzout commented on June 10, 2024

Isn't it just adding more to a list?

from packages.

titoBouzout avatar titoBouzout commented on June 10, 2024

This works for me

--- a/CSS.sublime-syntax
+++ b/CSS.sublime-syntax
@@ -1477,6 +1477,7 @@
 
   property-identifiers:
     # specific properties with special treatment
+    - include: custom-inheritable
     - include: counter-properties
     - include: font-family-properties
     - include: font-properties
@@ -1489,6 +1490,12 @@
   # https://drafts.csswg.org/css-variables/#typedef-custom-property
   custom-properties:
     - match: '--'
+      push:
+        - property-value
+        - custom-property-content
+
+  custom-inheritable:
+    - match: 'color|direction|font-family|font-kerning|font-optical-sizing|font-palette|font-size|font-size-adjust|font-stretch|font-style|font-variant-ligatures|font-variant-caps|font-variant-east-asian|font-variant-numeric|font-variant-alternates|font-weight|font-synthesis-weight|font-synthesis-style|font-synthesis-small-caps|font-feature-settings|font-variation-settings|font-variant-position|-webkit-font-smoothing|forced-color-adjust|-webkit-locale|math-depth|text-orientation|-webkit-text-orientation|writing-mode|-webkit-writing-mode|text-rendering|accent-color|border-collapse|caption-side|caret-color|clip-rule|color-interpolation|color-interpolation-filters|color-rendering|color-scheme|cursor|dominant-baseline|empty-cells|fill|fill-opacity|fill-rule|hyphenate-limit-chars|hyphens|image-rendering|image-orientation|dynamic-range-limit|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|marker-end|marker-mid|marker-start|math-shift|math-style|orphans|overflow-wrap|paint-order|pointer-events|quotes|scrollbar-color|shape-rendering|speak|stroke|stroke-dasharray|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|tab-size|text-align|text-align-last|text-anchor|text-autospace|text-combine-upright|text-decoration-skip-ink|text-indent|text-shadow|text-size-adjust|text-spacing-trim|text-transform|text-underline-offset|text-underline-position|visibility|-webkit-border-horizontal-spacing|-webkit-border-vertical-spacing|hyphenate-character|-webkit-line-break|line-break|-webkit-print-color-adjust|-webkit-rtl-ordering|-webkit-ruby-position|ruby-position|-webkit-tap-highlight-color|-webkit-text-combine|text-emphasis-color|text-emphasis-position|text-emphasis-style|-webkit-text-fill-color|-webkit-text-security|-webkit-text-stroke-color|-webkit-text-stroke-width|-webkit-user-modify|user-select|white-space-collapse|text-wrap|widows|word-break|word-spacing|-webkit-text-decorations-in-effect|-internal-visited-color|-internal-visited-caret-color|-internal-visited-fill|-internal-visited-stroke|-internal-visited-text-emphasis-color|-internal-visited-text-fill-color|-internal-visited-text-stroke-color|-internal-forced-color|-internal-forced-visited-color|-internal-empty-line-height'
       push:
         - property-value

I got the list from https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/core/css/css_properties.json5
using this filter properties.data.filter(item=>item.inherited).map(item=>item.name)

from packages.

titoBouzout avatar titoBouzout commented on June 10, 2024

@deathaxe is it possible to extend the syntax, so I can apply the change I made while also keeping the syntax from here up to date ? I am not sure if thats clear so will word it differently. The question is about trying to apply my changes on top of the default CSS syntax by just extending it

from packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.