-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Readjust few new tokens for HTML #2338
Comments
I implemented most of your suggestions and you should now be able to implement the theme.
I hope it still works for even with the changes I made. |
Great, @RunDevelopment! I'll clone, compile and test it. |
I cloned your repository |
Yes, merging them won't work. Here's a branch which has the changes of all 3. |
Hello @RunDevelopment ! Thank you for creating the branch and merging all the branches. I git-pulled the upstream. I copied the latest My CSS was: .token.entity
{
color: var(--pink);
}
.token.entity.named-entity
{
color: var(--purple);
}
.language-html .token.entity
{
color: var(--pink);
}
.language-html .token.entity.named-entity
{
color: var(--purple);
} |
That's because |
Maybe we need to create a new alias? |
Why? |
Because, to mimic the VSCode theme, and following Dracula's documentation, the unnamed entities have to be purple instead of pink. |
Hello @RunDevelopment ! Yes, it is. Both they have to be pink. Actually they have to be purple because, in Dracula-themed VSCode, both named and unnamed entities are purple. I need to see if |
So the normal color of all entities is pink and only the unnamed entities in markup are purple? .token.entity {
color: pink;
}
.language-markup .token.entity:not(.named-entity) {
color: purple;
} |
Hello @RunDevelopment You figured and got it. Thank you! I'm going to test it. |
Hello @RunDevelopment With your pull request merged, the colours do not work anymore: It seems that the site of Prismjs did not update the developer file. |
Hello @Golmote, @RunDevelopment, @mAAdhaTTah and @zeitgeist87!
Description
In reference to dracula/prism#11, I followed the Dracula's specific documentation. Imitating and mimicking the HTML syntax highlighting in VSCode, there are small differences between Prism's HTML and VSCode's HTML syntax highlightings. See the alternatives with solutions:
Alternatives
Using Dracula theme, compare
<!DOCTYPE html>
, entirely highlighted as pink by the classtoken.doctype
in Prismjs, but in VSCode, it is different:Solution:
token.doctype
, which will regex the whole<!DOCTYPE html>
, but;token.doctype-name
which will regexDOCTYPE
ordoctype
;token.doctype-html
which will regexhtml
.Observe the same images, you can see the different colour of
=
(equal symbol) and of quotation marks, which belong to the classtoken.punctuation
, of which brackets and parentheses also make part. But to get the same result, you should separate the equal symbol and the quotation marks from thetoken.punctuation
only if you addlanguage-html
,language-markup
andlanguage-php
.Solution:
language-xxx
(html
,markup
andphp
)token.punctuation-equal
for equal symbol;language-xxx
(html
,markup
andphp
)token.punctuation-quotes
for quotation marks.Using the Dracula theme ASCII codes are highlighted as pink, and declared by the class
.token.entity
by Prismjs, while Dracula's specific documentation’sHtmlTags
declares the colour as purple, as we see in VSCode. If I change the colour to purple, all the entities also will become purple, the ASCII codes should be separated from the classes, the entities and the functions.Solution:
&
and&#
and ending with;
) from the entities and create the new classtoken.ascii
.The text was updated successfully, but these errors were encountered: