Closed Sepitus-exe closed 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.
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).
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.
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.
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.
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):
I do most of my heavy editing in VScode.
To test, I just ctrl-a
ctrl-c
in my editor, then ctrl-a
ctrl-v
in the stylus editor, clicking the button to overwrite the entire file, then ctrl-s
to save in stylus for good measure. Note that pasting the entire file in either stylus window (the top , untargeted comment header window, or the bottom www.wanikani.com targeted window) will overwrite BOTH sections.
I perform any tinkering/tweaking in stylus so that I get live updates, but I try hard to only change a rule or two at a time.
When I'm satisfied with my tweaks, I'll select just the rule(s) I'm interested in, ctrl-c
, then paste them into my editor.
Once everything seems to be working in stylus, I do one final whole-file copy-and-paste from my editor to stylus to ensure I've captured everything.
Basically, my rules are:
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.
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.
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.
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).