Page MenuHomePhabricator

Bump monospace font +1px when using Source Sans Pro
ClosedPublic

Authored by chad on Jan 31 2015, 9:09 PM.
Tags
None
Referenced Files
F13817238: D11597.id.diff
Thu, Sep 19, 11:35 PM
Unknown Object (File)
Mon, Aug 26, 2:06 PM
Unknown Object (File)
Sat, Aug 24, 6:51 PM
Unknown Object (File)
Thu, Aug 22, 12:27 PM
Unknown Object (File)
Aug 18 2024, 11:51 PM
Unknown Object (File)
Aug 17 2024, 1:47 PM
Unknown Object (File)
Aug 17 2024, 12:47 PM
Unknown Object (File)
Aug 16 2024, 9:05 PM
Subscribers

Details

Summary

This diff moves the default monospace font from a Global Default config value to CSS. What this will allow is some flexibility in changing this font in other areas (like Diviner and DocumentView) without changing the defaults globally. However if the admin sets a config value or a user sets a config value, that value will trump all settings in the CSS files with an !important declaration in the page head.

Test Plan

Currently tested:

  • Setting no value
  • Setting an admin value
  • Setting a user value

Verify remarkup blocks in Differential, Diviner, Conpherence, and Diffusion look as expected.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Bump monospace font +1px when using Source Sans Pro.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added reviewers: epriestley, btrahan.

I think these rules may be sufficiently specific that they will override the <style> tags we insert into the body to implement SettingsDisplay PreferencesMonospaced Font:

  • If you set that to something like 24px "Impact", is your preference still respected?

hmmm no... i think i'd have to make the ones in head more specific?

I don't think it's necessarily bad to say that the preference doesn't count on Phriction pages, but if we go that way we should make it fully not count instead of counting the font family but not the font size.

Let me think about this. Also, I have 'Source Code Pro' from Adobe (free) in a branch in my sandbox. It'd be interesting to offer some monospace options via a dropdown and bundled vs. making each developer individually install them. Monospace still looks like crap on Windows/Linux. http://blog.typekit.com/2012/09/24/source-code-pro/

I wonder if user inputed should just include !important. I know you hate that, haha.

I think it's 100% fine in this case.

Doesn't work then. Looks like we set Monospace in the head regardless of if it's default or custom.

chad planned changes to this revision.Feb 1 2015, 4:11 AM

Where does the "Global Default" get set in the code? I've grepped around and can't find a source. Ideally, I want to make the global default null and have it CSS driven. Then if install admins or users pick something else, push that up with !important.

I guess its driven right from PhabricatorSyntaxHighlightingConfigOptions ? Will poke there.

You can grep for, e.g., Monaco to find where the global default is. Looks like PhabricatorSyntaxHighlightingConfigOptions.

Yeah, that blew my mind it, I assumed that to be an example, not the actual default.

chad edited edge metadata.
  • Update
chad edited the test plan for this revision. (Show Details)
chad added inline comments.
webroot/rsrc/css/application/differential/changeset-view.css
64

This is now based on the defaults.

epriestley edited edge metadata.
This revision is now accepted and ready to land.Feb 28 2015, 10:01 PM
chad edited edge metadata.
  • Update
  • Restrict to just DocumentView
This revision was automatically updated to reflect the committed changes.