Page MenuHomePhabricator

D16523.id.diff
No OneTemporary

D16523.id.diff

diff --git a/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
--- a/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
+++ b/src/infrastructure/markup/rule/PhabricatorKeyboardRemarkupRule.php
@@ -182,6 +182,35 @@
}
$is_text = $this->getEngine()->isTextMode();
+ $is_html_mail = $this->getEngine()->isHTMLMailMode();
+
+ if ($is_html_mail) {
+ $key_style = array(
+ 'display: inline-block;',
+ 'min-width: 1em;',
+ 'padding: 4px 5px 5px;',
+ 'font-weight: normal;',
+ 'font-size: 0.8rem;',
+ 'text-align: center;',
+ 'text-decoration: none;',
+ 'line-height: 0.6rem;',
+ 'border-radius: 3px;',
+ 'box-shadow: inset 0 -1px 0 rgba(71, 87, 120, 0.08);',
+ 'user-select: none;',
+ 'background: #f7f7f7;',
+ 'border: 1px solid #C7CCD9;',
+ );
+ $key_style = implode(' ', $key_style);
+
+ $join_style = array(
+ 'padding: 0 4px;',
+ 'color: #92969D;',
+ );
+ $join_style = implode(' ', $join_style);
+ } else {
+ $key_style = null;
+ $join_style = null;
+ }
$parts = array();
foreach ($keys as $k => $v) {
@@ -202,6 +231,7 @@
'kbd',
array(
'title' => $spec['name'],
+ 'style' => $key_style,
),
$spec['symbol']);
}
@@ -214,6 +244,7 @@
'span',
array(
'class' => 'kbd-join',
+ 'style' => $join_style,
),
'+');
$parts = phutil_implode_html($glue, $parts);

File Metadata

Mime Type
text/plain
Expires
Mon, May 20, 10:54 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6297086
Default Alt Text
D16523.id.diff (1 KB)

Event Timeline