-
Notifications
You must be signed in to change notification settings - Fork 298
CSS font fixes #470
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
CSS font fixes #470
Conversation
If the Adelle font isn't found, the next one is Georgia anyway. No functional changes. Signed-off-by: Felipe Contreras <[email protected]>
These were defined before, and with the same values. Signed-off-by: Felipe Contreras <[email protected]>
Signed-off-by: Felipe Contreras <[email protected]>
There's no need to quote Adelle, neither Times New Roman; none have special characters. Signed-off-by: Felipe Contreras <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which how hello world pages look like
Do you mean "which is how hello world pages look like"?
Yeap. |
Thanks @felipec ! This looks good to me, but I don't know much about CSS, fonts and Windows, so if someone else could take a look especially at the "css: remove redundant font-family" commit, I would feel better about merging this. |
In Linux systems typically the first options don't exist, so the page ends up with 'serif', which is how hello world pages look like. At the very least we should specify a readable option: serif. Also, DejaVu Serif is good alternative for Georgia. And Roboto Slab is very similar to Adelle. This makes it so the fonts are readable in Linux systems. Other systems should not be affected. Signed-off-by: Felipe Contreras <[email protected]>
There is not much to know. Basically CSS is a cascade of overriding styles (thus the name Cascading Style Sheets). When you have two conflicting styles, CSS always picks the last one. You can test that this way (test.html): <style>
body { color: red; }
body { color: blue; }
</style>
<p>Hello world</p> So, when you have a You can read the descripription at MDN: "Values are separated by commas to indicate that they are alternatives. The browser will select the first font in the list that is installed or that can be downloaded using a @font-face at-rule." So there's no point in overriding Where it starts to get complex is when you add the DOM structure, for example "p" is a descendant of "body". But this doesn't change the initial analysis, if "body" has It doesn't matter if the overriding rule for "p" is only activated for Windows systems. The result would still be Georgia. That being said, the thing that is actually worth considering is the asterisk in the selector ".windows.chrome body *", because that means it would override the font-family of all tags. Which means even "code" or "pre" tags will show with this font (and not monospace as it was previously specified). But I don't see this happening in practice. In Windows 10 all the code shows with In fact, googling about this mythical ".windows.chrome" selector, I can't find anything. So it's probably some vestigial selector that was activated with some JavaScript code. Moreover, right after that there's a ".windows.ie8" selector, IE8 was released in 2009, IE9 was released in 2011. I tried to paint this rule red, and it didn't show in IE11 (the last and final release of IE), and it didn't show in Microsoft Edge (the one IE urges you to download). So I think it's safe to say it's not actually used. Long story short; I'm pretty sure this is some vestigial code that doesn't do anything, and it was wrong in the first place. |
589e45f
to
ea078c2
Compare
Dumb question: Is there a way of seeing, say, a previous Git Rev News formatted using the changes to see how it looks? |
Yeah, that should be possible if @felipec enables GitHub pages for the forked repository using the branch with the changes as the source. Alternatively, we should set-up one ourselves in our fork using a branch with the changes. |
Except when some rule uses
I don't think Googling it is going to help given that
This is quite possible. I took a little dive into history and found that it's been lifted from the libgit2's CSS file in which it seems to be present ever since the initial commit in that repo. To conclude, I also believe there's no harm with removing the |
That's But then, the next sentence says "using And the most relevant rule of thumb: "never use It seems pretty clear the current CSS is a bunch of bad practices one after the other. It doesn't look like anybody with knowledge of CSS has taken a good look at it. |
You can follow the instructions on the about page to install the github-pages gem on your machine, and run an instance of a Jekyll server. |
I don't think it works that way in CSS. I've only ever heard of
Yeah. I was pointing out about
BTW, I'll just note for the record that after this change I did notice a different in my Windows 10 machine. It actually makes sense given that I didn't have the Adelle font installed but had Georgia and DejaVu Serif. Looks like I've been reading Rev News using Georgia until recently and it got rendered in DejaVu Serif after this change (which I didn't like so much). I then installed Roboto Slab to get a more pleasant look. |
But this is literally what the documentation says: "When an So the documentation is very unclear, because first it mentions
It's weird that you have DejaVu Serif installed on Windows, and even so personally I think DejaVu Serif looks better than Georgia. But if others disagree the order can be changed. The important thing is to have DejaVu Serif on the list, for most Linux users. |
Yeah. It's contradictory syntax indeed [ref].
I'm guessing that's because I have LibreOffice installed. Though, I'm not sure if I manually installed it at some point. I don't remember doing that, though.
Your personal taste seems different from mine 🙂
Yeah. I'm likely an exception. In case someone else reports we could think about changing the order. Otherwise, I don't mind it being left as it is. |
A few cleanups, plus fixes for Linux systems, which don't have any of the fonts listed.
This basically adds Roboto Slab, and DejaVu Serif to the list of font-family, which makes it readable in Linux systems. Plus the fallback to sans-serif (we are not in 90s anymore).
I tested this in Arch Linux, Android 9, and Windows 10. Everything looks the same, except Arch Linux.
This fixes issue #469.