Skip to content

CSS lexer: Add more property names? #2113

Closed

Description

@voussoir

Hi, thanks for this great library.

Today, pointer-events caught my attention as Pygments does not highlight it. The list of recognized property names is here with 372 entries from the list at w3.org.

I checked the CSS package for Sublime Text and found these 503 entries. Of course, I'm not suggesting that Sublime is the source of truth here, it's simply a convenient point of reference for me. I'd like to understand the discrepancy between these lists. pointer-events is fully cross compatible according to MDN and presumably many other widely used names are on the list of differences.

inset is on w3 as Working Draft but absent from Pygments.

max-lines is on w3 as Working Draft but present in Pygments.

Could more of these names be added to Pygments's lexer, or are they excluded for a reason?

Thank you.

Activity

  1. amitkummer commented on Apr 16, 2022

    @amitkummer
    Contributor

    These are definitely needed to be added to the lexer.

    It also looks like some properties are located in a different list here, which could also be a part of this potential refactoring.

  2. birkenfeld commented on Apr 16, 2022

    @birkenfeld
    Member

    I agree. Best case would be an automatic way to update the list of properties from a web source, like we do for the builtins of several other languages (see the various _xxx_builtins.py modules)

  3. added this to the 2.12.0 milestone on Apr 24, 2022
  4. self-assigned this
    on Apr 24, 2022
  5. added a commit that references this issue on Mar 16, 2024
    94b4c6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions