feat: CSS library (for use in userstyles)#28
feat: CSS library (for use in userstyles)#28ninetailedtori wants to merge 61 commits intocatppuccin:mainfrom
Conversation
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
This comment was marked as spam.
This comment was marked as spam.
|
I mentioned my feedback through Discord, but to summarize:
I also wanted to note that the CSS here for the tokens is for CodeMirror v5 or earlier iirc. Nowadays in v6, the tokens are more obfuscated and we need to do something more like this: .ͼg {
color: @blue; // function/identifier
}
.ͼb {
color: @mauve; // keywords
}
.ͼe {
color: @green; // strings
}
.ͼf {
color: @pink; // unknown? template strings?
}
.ͼl {
color: @lavender; // object property
}
.ͼj {
color: @teal; // class instantiation identifier
}
.ͼm {
color: @overlay2; // comments
}
.ͼd {
color: @peach; // numbers
}
.ͼc {
color: @peach; // booleans
}I was trying to figure out if we could get these |
Signed-off-by: Toria <ninetailedtori@uwu.gal>
…y some js, clearly. Signed-off-by: Toria <ninetailedtori@uwu.gal>
…is helps to know. Signed-off-by: Toria <ninetailedtori@uwu.gal>
|
It's not clear to me why this is a Less file now. It should just be something like https://github.com/catppuccin/prismjs/blob/main/themes/variables.css, using CSS variables. |
|
I also don't think userstyles-specific documentation should be in an unrelated port. If we were to use this in userstyles, we would document usage in the appropriate place - https://userstyles.catppuccin.com/contributing/guides/syntax-highlighting/. Secondly, a key part of this is that it should address this earlier point:
|
Signed-off-by: Toria <ninetailedtori@uwu.gal>
We're using accent and darken. Accent I think is covered by --ctp-accent, but I'm not sure how to implement darken with JUST css variables, we don't have access to that in raw css. We do have rgba for the values but then the css variables are given in hex, and wouldn't make sense to it. That would bring back the need for whiskers. |
Wait, no, did we discuss this and we had a way to do it? One sec, lemme see if I can fix that. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
We can, but it's a bit painful. The method I used to output the eventual tokens, the epsilon ones, can be seen in one sec, and was also in an older commit, but my code had to render it to access the end stylesheet. It's complex and doesn't seem to include everything either. I have to patch that, until it's suitable to function for the final code. |
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
|
I'm not sure I'm gonna be able to find a method that accurately calculates this, without rendering it in the DOM, and even then, the way the lib works is that it ONLY renders what it has to see. Unfortunately not knowing exactly what triggers every single class they use, I also won't have an accurate way of getting this. I'm going to read up on the token-side of what is understood as what, and see if I can make a test render that works fully to convert what we have in our theme at the least. Edit: I'm crazy, I'm mad, I absolutely cannot be stopped! I'VE DONE IT!!! And the cost is... cheap, since we ALREADY host the website and don't actively have to render ANYTHING, we're just scraping the style sheet from our test site :] You may applaud now 😤 |
…nd theming! Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Use the colors from our palette, silly! P.S. Also, styling broke, oops. Signed-off-by: Toria <ninetailedtori@uwu.gal>
it's more of a style thing given optimisations in the current engines making them pretty equal but...this is neater innit Signed-off-by: Toria <ninetailedtori@uwu.gal>
Co-authored-by: uncenter <uncenter@uncenter.dev>
Yes, it breaks our css and thus will be ENTIRELY IGNORED but we'll change it in another PR. C.F. catppuccin#38 Signed-off-by: Toria <ninetailedtori@uwu.gal>
|
On a userstyles note, we ideally want a version that uses CSS variables to pull in. |
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Signed-off-by: Toria <ninetailedtori@uwu.gal>
Co-authored-by: uncenter <uncenter@uncenter.dev>
Co-authored-by: uncenter <uncenter@uncenter.dev>
…e excess error logging.
Signed-off-by: Toria <ninetailedtori@uwu.gal>
…iling theme-spec.ts
Signed-off-by: Toria <ninetailedtori@uwu.gal>
This PR adds CSS themes, that can be included in a userstyle easily, as such, example taken from my edit of Stylus Catppuccin, as a proof of successful usage, with a possible URL we can host on: