Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13222614
D16523.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16523.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, May 20, 3:49 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6297086
Default Alt Text
D16523.diff (1 KB)
Attached To
Mode
D16523: Add inline styles for `{key ...}` in HTML mail
Attached
Detach File
Event Timeline
Log In to Comment