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
F14036259: D11597.diff
Sun, Nov 10, 9:23 AM
F14035826: D11597.diff
Sun, Nov 10, 7:43 AM
F14033757: D11597.diff
Sat, Nov 9, 7:51 PM
F14022310: D11597.diff
Wed, Nov 6, 4:09 PM
F14016257: D11597.id28692.diff
Mon, Nov 4, 7:32 AM
F13991121: D11597.diff
Tue, Oct 22, 8:54 AM
F13987222: D11597.diff
Mon, Oct 21, 8:08 AM
F13980218: D11597.id28637.diff
Sat, Oct 19, 9:07 AM
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
Branch
phui-sans-remarkup-code
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4206
Build 4219: [Placeholder Plan] Wait for 30 Seconds

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 ↗(On Diff #28637)

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.