Bug 1399616 - add WP emoji styling to reader mode.

This commit is contained in:
Ascrod 2019-04-27 08:49:17 -04:00 committed by Roy Tam
commit a0ceaeace8
2 changed files with 13 additions and 0 deletions

View file

@ -12,6 +12,7 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
// names so that rules in aboutReader.css can match them.
const CLASSES_TO_PRESERVE = [
"caption",
"emoji",
"hidden",
"invisble",
"sr-only",
@ -19,6 +20,7 @@ const CLASSES_TO_PRESERVE = [
"visuallyhidden",
"wp-caption",
"wp-caption-text",
"wp-smiley",
];
Cu.import("resource://gre/modules/Services.jsm");

View file

@ -738,3 +738,14 @@ body:not(.loaded) .toolbar:-moz-locale-dir(rtl) {
.moz-reader-content .sr-only {
display: none;
}
/* Enforce wordpress and similar emoji/smileys aren't sized to be full-width */
.moz-reader-content img.wp-smiley,
.moz-reader-content img.emoji {
display: inline-block;
border-width: 0;
/* height: auto is implied from `.moz-reader-content *` rule. */
width: 1em;
margin: 0 .07em;
padding: 0;
}