Sepitus-exe / WKElementaryDark

A user css theme for the wanikani domain
MIT License
3 stars 1 forks source link

Image props #111

Closed Sepitus-exe closed 1 year ago

Sepitus-exe commented 1 year ago

I tried my best at exposing as much as made sense to me, but... There are a few filters that are used exclusively on text to force it to mimic the look of --EDI-text. Optimally, there would be just a simple color: parameter instead of a filter, but I can't make it work no matter how hard I bash my head into it. If you want to give it a try the filters are on lines 840 (footer of summary pages) and 1148 (kana chart in reviews).

wrex commented 1 year ago

There are a few filters that are used exclusively on text to force it to mimic the look of --EDI-text. Optimally, there would be just a simple color: parameter instead of a filter, but I can't make it work no matter how hard I bash my head into it. If you want to give it a try the filters are on lines 840 (footer of summary pages) and 1148 (kana chart in reviews).

For line 840, there was a filter from the dashboard that was applied to the parent footer element in addition to the filter in that specific rule (so normal text colors were still getting filtered).

The solution is to make the dashboard rule only work on the dashboard. On the kana pages, the footer element is nested fairly deeply, but on the dashboard it's a direct child of the body, so this rule now only applies on the dashboard:

body > footer {
  filter: var(--ED-footer-filter);
}

I can't reproduce the issue on line 1148 (kana chart in reviews). Just using --ED-text or --EDI-text-color without the filter works for me.

Apologies, but prettier made some additional formatting changes. I'll add a .prettierrc in another PR so we can be more consistent with our formatting.

Also: what editor are you using? Almost the whole world has switched to VScode these days (even me, and I'm an old BSD Unix vi die hard). You're kinda fighting agains the grain if you don't use VScode, fwiw. I've not used it on Linux, but I know it's at least possible. VScode with emmet, prettier, snippets, etc. makes any coding about a million times easier, fwiw.

I noticed some other indentation issues, but I'll fix them in a separate commit to keep things cleaner.

wrex commented 1 year ago

I added one more rule for the self-study quiz. Doesn't belong in this PR, but just wanted to make things as easy as possible.

It fixes the styling in the following screenshot (without the fix, the "Failed Last Review" text next to the checkbox was white on white).

Screenshot 2023-02-20 at 5 44 34 PM
wrex commented 1 year ago

I'm okay to merge this. Passing back to you for final review.

Weird. I can't request you as a reviewer for some reason. I don't want to merge until you've had a chance to look at my last three commits, though.

Sepitus-exe commented 1 year ago

Also: what editor are you using? Almost the whole world has switched to VScode these days (even me, and I'm an old BSD Unix vi die hard). You're kinda fighting agains the grain if you don't use VScode, fwiw.

For most of my work I use VScodium, but using a dedicated text editor for this project seemed unnecessary. I have been using the default one stylus provides. It's hard to compete with out of the box live previews.

I can't reproduce the issue on line 1148 (kana chart in reviews). Just using --ED-text or --EDI-text-color without the filter works for me.

I will check if it's not a browser issue and will remove the filter accordingly.

Sepitus-exe commented 1 year ago

I will check if it's not a browser issue and will remove the filter accordingly.

I see you already did so. And what's more, it now appears to be working as intended on my side as well. I do not dare to ask frivolous questions such as why or how for I am just a humble servant of the code who will greatfully receive this blessing and courteously merge it.

wrex commented 1 year ago

It's hard to compete with out of the box live previews.

Agreed. But for what it's worth, I use a compromise workflow (because I distrust the in-browser editor for things like indenting, linting, and formatting of entire files):

Basically, my rules are:

  1. Whole file cut and paste only FROM my editor to stylus.
  2. Only individual rules/selectors/property-assignments flow from stylus to my editor.

The song-and-dance is a little bit of a pain, but it works well for me, and getting prettier-on-save is worth it to me.

wrex commented 1 year ago

By the way: I've started deleting merged branches (turns out they can be resurrected anyway, which I hadn't realized when I proposed keeping them). Things tend to get a bit cluttered with too many branches in the pulldown.

Sepitus-exe commented 1 year ago

By the way: I've started deleting merged branches (turns out they can be resurrected anyway

Oh, that's good news; I will get rid of the rest of them (or at least the old ones), so they don't display as active branches on the main page anymore.


I will try to work an ide into my workflow based on your example, but can't promise the result will be any better. I'm super unfamiliar with formatters in general, it might take some time for me to get used to them.