Skip to content

Inconsistent coloring for parenthesis? #18

Open
@Aster89

Description

@Aster89

(In case any reader is interested, I originally meant to report to Vim, because in my current version the --tx below is not colored appropriately, but looking into existing issues I eventually got brought to this repo, and I have verified that the latest css.vim correct that coloring.)

In the following ruleset, the parenthesis of translate and var are colored just like translate and var, whereas the parenthesis of calc are white.

.container {
  transform: translate(calc(var(--tx, 0px) + var(--i, 0)/var(--n)*-100%));
}

I see that the highlight groups for calc's parenthesis are

['cssDefinition', 'cssAttrRegion', 'cssFunction', 'cssMathGroup', 'cssMathParens']

whereas those for var's and translate's parenthesis are respectively

['cssDefinition', 'cssAttrRegion', 'cssFunction', 'cssMathGroup', 'cssFunction', 'cssFunctionName']
['cssDefinition', 'cssAttrRegion', 'cssFunction', 'cssFunctionName']

so maybe the different coloring is intended. However I find it a bit weird.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions