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.
Details
- Reviewers
epriestley btrahan - Commits
- Restricted Diffusion Commit
rP0a8eee37a103: Bump monospace font +1px when using Source Sans Pro
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
I think these rules may be sufficiently specific that they will override the <style> tags we insert into the body to implement Settings → Display Preferences → Monospaced Font:
- If you set that to something like 24px "Impact", is your preference still respected?
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.
Doesn't work then. Looks like we set Monospace in the head regardless of if it's default or custom.
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.
webroot/rsrc/css/application/differential/changeset-view.css | ||
---|---|---|
64 | This is now based on the defaults. |