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
Unknown Object (File)
Mon, Dec 16, 11:49 AM
Unknown Object (File)
Wed, Dec 11, 8:16 AM
Unknown Object (File)
Mon, Dec 9, 10:59 PM
Unknown Object (File)
Sun, Dec 8, 7:48 PM
Unknown Object (File)
Wed, Nov 27, 12:36 AM
Unknown Object (File)
Tue, Nov 26, 7:44 AM
Unknown Object (File)
Fri, Nov 22, 9:21 PM
Unknown Object (File)
Nov 18 2024, 9:44 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
Tests Passed
Build Status
Buildable 4648
Build 4662: [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

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.