Skip to content

Instantly share code, notes, and snippets.

@jnturton
Last active August 30, 2024 15:10
Show Gist options
  • Save jnturton/34d8bad35f79c9de916f44d0f08e9fbc to your computer and use it in GitHub Desktop.
Save jnturton/34d8bad35f79c9de916f44d0f08e9fbc to your computer and use it in GitHub Desktop.
A multi-column layout for Firefox's Reader mode.
/* Save this file as userContent.css in the chrome/ subdirectory of your Firefox profile
* directory. You may need to create the chrome/ subdirectory first.
*/
@namespace url(http://www.w3.org/1999/xhtml);
/* multi-column layout for FF < 58 */
@-moz-document url-prefix("about:reader") {
/* multi-column layout */
#container {
max-width: initial !important;
column-width: 25rem;
column-gap: 1rem;
text-align: justify;
hyphens: auto;
}
/* reduce font size for code and literal text */
#container pre, #container code {
font-size: initial;
}
/* (optional) Hide HTML elements belonging to antenna.is, a user feedback system used by some sites */
span.antenna {
display: none;
}
}
/* multi-column layout for FF >= 59, identifying Reader HTML is messier */
body.loaded>div.content-width1
,body.loaded>div.content-width2
,body.loaded>div.content-width3
,body.loaded>div.content-width4
,body.loaded>div.content-width5
,body.loaded>div.content-width6
,body.loaded>div.content-width7
,body.loaded>div.content-width8
,body.loaded>div.content-width9 {
max-width: initial !important;
column-width: 25rem;
column-gap: 1rem;
text-align: justify;
hyphens: auto;
}
/* reduce font size for code and literal text */
.moz-reader-content pre, .moz-reader-content code {
font-size: initial;
}
/* (optional) Hide HTML elements belonging to antenna.is, a user feedback system used by some sites */
.moz-reader-content span.antenna {
display: none;
}
@jnturton
Copy link
Author

jnturton commented Apr 8, 2018

Updated for Firefox 59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment