GithubHelp home page GithubHelp logo

Comments (9)

jimeh avatar jimeh commented on June 15, 2024 1

Indeed, seems like it's an undocumented feature of the parser in Stylus, implemented here from what I can tell: https://github.com/openstyles/stylus/blob/v1.5.22/js/usercss-compiler.js#L66-L95

Tracing it back, it looks like it's been part of the UserCSS implementation from the beginning, added in openstyles/stylus#134 (js/usercss.js, lines 62-89). Just one of those somewhat quirky features that never got documented and has been flying under the radar ever since :)

from github-dark.

mikefreuden avatar mikefreuden commented on June 15, 2024 1

I actually did some digging and found it to be an old USo feature! Will definitely add support for this in the next Cascadea update.

Oh, the fun of implementing your own UserCSS parser/compiler from scratch. :)

from github-dark.

mikefreuden avatar mikefreuden commented on June 15, 2024 1

I've actually had this implemented for a week now and was going to wait until I had a few more fixes or changes in place to bother shipping it, but given that might be a while, I've gone ahead and pushed Cascadea 2.1.3 to the App Store which should support this:

Screen Shot 2021-11-02 at 10 36 01 AM

It's still waiting for Apple approval (edit: approved!), but once it's out, you should just need to have Cascadea recompile GitHub Dark (which will happen automatically when updating, or if you open the Style Properties window and click "Save") for it to properly apply these variables.

from github-dark.

the-j0k3r avatar the-j0k3r commented on June 15, 2024

Have you tested chrome/firefox + stylus? Are you using the latest version of this style?

from github-dark.

jimeh avatar jimeh commented on June 15, 2024

@the-j0k3r Yep, it works fine in Chrome and Firefox using Stylus. Everything is fully updated; browsers, Stylus, Cascadea, and the GitHub Dark userstyle CSS.

Hence I suspect maybe it's Cascadea that lacks support for the -rgb thing on color options?

from github-dark.

the-j0k3r avatar the-j0k3r commented on June 15, 2024

The dev is around and pingable. @mikefreuden

This one is all yours, thx ;)

@jimeh no worries thanks for actually testing. ;)

from github-dark.

mikefreuden avatar mikefreuden commented on June 15, 2024

Oh hello!

I'd be happy to fix this on Cascadea's end, but I'm not quite sure I understand what GitHub Dark is doing here. There's indeed no base-color-rgb variable defined in the UserCSS header. I'm assuming Stylus added support for some way to specify the format of a color variable by appending the format to it or something along those lines that I missed out on and isn't documented in the Writing UserCSS article? 😅

from github-dark.

jimeh avatar jimeh commented on June 15, 2024

For now I have made a quick hack userstyle to work around the issue. It simply overrides the specific CCS variables affected. I use the default Base Color in GitHub Dark (#4f8cc9), which is 79, 140, 201 in RGB values.

@-moz-document domain("githubusercontent.com"), domain("githubstatus.com"), domain("github.com")
{
	:root:root:root {
		--color-accent-muted: rgba(79, 140, 201, .3);
		--color-auto-blue-2: rgba(79, 140, 201, .25);
		--color-auto-blue-3: rgba(79, 140, 201, .5);
		--color-calendar-graph-day-L1-bg: rgba(79, 140, 201, .25);
		--color-calendar-graph-day-L2-bg: rgba(79, 140, 201, .5);
		--color-calendar-graph-day-L3-bg: rgba(79, 140, 201, .75);
		--color-primer-shadow-focus: 0 0 0 2.25px rgba(79, 140, 201, .3);
		--color-state-focus-shadow: 0 0 0 2.25px rgba(79, 140, 201, .3);
	}
}

from github-dark.

jimeh avatar jimeh commented on June 15, 2024

@mikefreuden thanks, I just updated to Cascadea 2.1.3 and things all work as expected now :D

from github-dark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.