-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hey 👋🏻 @huozhi, thanks for the work with this library! 💜
I'm updating the Dracula Theme website and trying it.
I identified some inconsistencies in the CSS highlighting that affect tokenisation accuracy. Specifically, CSS properties and hexadecimal values are not being categorised correctly according to the available TokenTypes
.
For the following CSS snippet:
body {
background: #000;
}
The tokenisation I would expect:
body
→identifier
;{
→sign
;background
→property
;:
→sign
;#000
→string
ornumber
;;
→sign
;}
→sign
.
Current tokenisation:
body
→identifier
;{
→sign
;background
→identifier
→ (should beproperty
);:
→sign
;#
→sign
→ (should be part ofstring
ornumber
);000
→number
→ (should be part ofstring
ornumber
);;
→sign
;}
→sign
.
If this is expected and correct, would the next step be to change the colours based on the language? 🤔
This part is crucial to us, because on the new page dedicated to the Dracula Theme and Alucard specifications, we have sections like these to exemplify what is expected:
/* Pink - White */
body {
/* Cyan - Pink - Purple */
background: #000;
}
/* Green - White */
#dracula {
display: none;
visibility: hidden;
height: calc(var(--deathDate) - var(--birthDate));
/* Cyan - Pink - Yellow */
font-family: "Transylvania";
/* Cyan - Pink - Purple */
opacity: 0;
}
This should also be accurate on the website to avoid generating unnecessary noise. 😅