mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
Bump monospace font +1px when using Source Sans Pro
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. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11597
This commit is contained in:
parent
6581759259
commit
0a8eee37a1
6 changed files with 63 additions and 21 deletions
|
@ -7,10 +7,10 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '3fa78a8d',
|
||||
'core.pkg.css' => 'dc3f102a',
|
||||
'core.pkg.js' => '23d653bb',
|
||||
'darkconsole.pkg.js' => '8ab24e01',
|
||||
'differential.pkg.css' => '14f0fa92',
|
||||
'differential.pkg.css' => '4c3242f8',
|
||||
'differential.pkg.js' => '7b5a4aa4',
|
||||
'diffusion.pkg.css' => '591664fa',
|
||||
'diffusion.pkg.js' => 'bfc0737b',
|
||||
|
@ -56,7 +56,7 @@ return array(
|
|||
'rsrc/css/application/dashboard/dashboard.css' => 'c0062064',
|
||||
'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c',
|
||||
'rsrc/css/application/differential/add-comment.css' => 'c478bcaa',
|
||||
'rsrc/css/application/differential/changeset-view.css' => '8244e5a8',
|
||||
'rsrc/css/application/differential/changeset-view.css' => 'a7781046',
|
||||
'rsrc/css/application/differential/core.css' => '7ac3cabc',
|
||||
'rsrc/css/application/differential/results-table.css' => '181aa9d9',
|
||||
'rsrc/css/application/differential/revision-comment.css' => '48186045',
|
||||
|
@ -106,7 +106,7 @@ return array(
|
|||
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
|
||||
'rsrc/css/application/uiexample/example.css' => '528b19de',
|
||||
'rsrc/css/core/core.css' => 'c8c5ecd2',
|
||||
'rsrc/css/core/remarkup.css' => '07f22227',
|
||||
'rsrc/css/core/remarkup.css' => '2dbff225',
|
||||
'rsrc/css/core/syntax.css' => '56c1ba38',
|
||||
'rsrc/css/core/z-index.css' => '8239495e',
|
||||
'rsrc/css/diviner/diviner-shared.css' => '38813222',
|
||||
|
@ -130,7 +130,7 @@ return array(
|
|||
'rsrc/css/phui/phui-document.css' => '8240b0b1',
|
||||
'rsrc/css/phui/phui-error-view.css' => '41518665',
|
||||
'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5',
|
||||
'rsrc/css/phui/phui-fontkit.css' => 'bd111278',
|
||||
'rsrc/css/phui/phui-fontkit.css' => '4394f216',
|
||||
'rsrc/css/phui/phui-form-view.css' => '8b78a986',
|
||||
'rsrc/css/phui/phui-form.css' => 'f535f938',
|
||||
'rsrc/css/phui/phui-header-view.css' => '083669db',
|
||||
|
@ -522,7 +522,7 @@ return array(
|
|||
'conpherence-notification-css' => '04a6e10a',
|
||||
'conpherence-update-css' => '1099a660',
|
||||
'conpherence-widget-pane-css' => '3d575438',
|
||||
'differential-changeset-view-css' => '8244e5a8',
|
||||
'differential-changeset-view-css' => 'a7781046',
|
||||
'differential-core-view-css' => '7ac3cabc',
|
||||
'differential-inline-comment-editor' => 'f2441746',
|
||||
'differential-results-table-css' => '181aa9d9',
|
||||
|
@ -740,7 +740,7 @@ return array(
|
|||
'phabricator-phtize' => 'd254d646',
|
||||
'phabricator-prefab' => '72da38cc',
|
||||
'phabricator-profile-css' => 'd8cb982b',
|
||||
'phabricator-remarkup-css' => '07f22227',
|
||||
'phabricator-remarkup-css' => '2dbff225',
|
||||
'phabricator-search-results-css' => 'f240504c',
|
||||
'phabricator-shaped-request' => '7cbe244b',
|
||||
'phabricator-side-menu-view-css' => '7e8c6341',
|
||||
|
@ -785,7 +785,7 @@ return array(
|
|||
'phui-error-view-css' => '41518665',
|
||||
'phui-feed-story-css' => 'c9f3a0b5',
|
||||
'phui-font-icon-base-css' => '3dad2ae3',
|
||||
'phui-fontkit-css' => 'bd111278',
|
||||
'phui-fontkit-css' => '4394f216',
|
||||
'phui-form-css' => 'f535f938',
|
||||
'phui-form-view-css' => '8b78a986',
|
||||
'phui-header-view-css' => '083669db',
|
||||
|
|
|
@ -140,7 +140,7 @@ final class PhabricatorSyntaxHighlightingConfigOptions
|
|||
$this->newOption(
|
||||
'style.monospace',
|
||||
'string',
|
||||
'10px "Menlo", "Consolas", "Monaco", monospace')
|
||||
null)
|
||||
->setLocked(true)
|
||||
->setSummary(
|
||||
pht('Default monospace font.'))
|
||||
|
@ -151,7 +151,7 @@ final class PhabricatorSyntaxHighlightingConfigOptions
|
|||
$this->newOption(
|
||||
'style.monospace.windows',
|
||||
'string',
|
||||
'11px "Menlo", "Consolas", "Monaco", monospace')
|
||||
null)
|
||||
->setLocked(true)
|
||||
->setSummary(
|
||||
pht('Default monospace font for clients on Windows.'))
|
||||
|
|
|
@ -270,18 +270,31 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
|||
|
||||
$response = CelerityAPI::getStaticResourceResponse();
|
||||
|
||||
$font_css = null;
|
||||
if (!empty($monospaced)) {
|
||||
$font_css = hsprintf(
|
||||
'<style type="text/css">'.
|
||||
'.PhabricatorMonospaced, '.
|
||||
'.phabricator-remarkup .remarkup-code-block '.
|
||||
'.remarkup-code { font: %s !important; } '.
|
||||
'</style>', $monospaced);
|
||||
}
|
||||
|
||||
$font_css_win = null;
|
||||
if (!empty($monospaced_win)) {
|
||||
$font_css_win = hsprintf(
|
||||
'<style type="text/css">'.
|
||||
'.platform-windows .PhabricatorMonospaced, '.
|
||||
'.platform-windows .phabricator-remarkup '.
|
||||
'.remarkup-code-block .remarkup-code { font: %s !important; }'.
|
||||
'</style>', $monospaced_win);
|
||||
}
|
||||
|
||||
return hsprintf(
|
||||
'%s<style type="text/css">'.
|
||||
'.PhabricatorMonospaced, '.
|
||||
'.phabricator-remarkup .remarkup-code-block '.
|
||||
'.remarkup-code { font: %s; } '.
|
||||
'.platform-windows .PhabricatorMonospaced, '.
|
||||
'.platform-windows .phabricator-remarkup '.
|
||||
'.remarkup-code-block .remarkup-code { font: %s; }'.
|
||||
'</style>%s',
|
||||
'%s%s%s%s',
|
||||
parent::getHead(),
|
||||
phutil_safe_html($monospaced),
|
||||
phutil_safe_html($monospaced_win),
|
||||
$font_css,
|
||||
$font_css_win,
|
||||
$response->renderSingleResource('javelin-magical-init', 'phabricator'));
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
color: {$bluetext};
|
||||
cursor: pointer;
|
||||
border-right: 1px solid {$thinblueborder};
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
|
||||
-moz-user-select: -moz-none;
|
||||
|
|
|
@ -10,6 +10,21 @@
|
|||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.PhabricatorMonospaced,
|
||||
.phabricator-remarkup .remarkup-code-block .remarkup-code {
|
||||
font: 10px "Menlo", "Consolas", "Monaco", monospace;
|
||||
}
|
||||
|
||||
.platform-windows .PhabricatorMonospaced,
|
||||
.platform-windows .phabricator-remarkup .remarkup-code-block .remarkup-code {
|
||||
font: 11px "Menlo", "Consolas", "Monaco", monospace;
|
||||
}
|
||||
|
||||
.phabricator-remarkup .remarkup-code-block {
|
||||
margin: 12px 0;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.phabricator-remarkup .remarkup-code-header {
|
||||
padding: 4px 1px;
|
||||
font-size: 13px;
|
||||
|
|
|
@ -17,6 +17,21 @@
|
|||
line-height: 18px;
|
||||
}
|
||||
|
||||
.PhabricatorMonospaced .phui-document-view .phui-font-source-sans,
|
||||
.phui-document-view .phui-font-source-sans .phabricator-remarkup
|
||||
.remarkup-code-block .remarkup-code {
|
||||
font-size: 11px;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
.platform-windows .PhabricatorMonospaced .phui-document-view
|
||||
.phui-font-source-sans,
|
||||
.platform-windows .phui-document-view .phui-font-source-sans
|
||||
.phabricator-remarkup .remarkup-code-block .remarkup-code {
|
||||
font-size: 12px;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
.phui-font-source-sans .phabricator-remarkup h2.remarkup-header {
|
||||
padding: 8px 24px 8px 0;
|
||||
border-bottom: 1px solid {$thinblueborder};
|
||||
|
|
Loading…
Reference in a new issue