NetNewsWire/Shared/Article Rendering/stylesheet.css

598 lines
10 KiB
CSS
Raw Normal View History

2020-04-20 01:38:33 +02:00
body {
margin-left: auto;
margin-right: auto;
word-wrap: break-word;
max-width: 44em;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.feedlink {
font-weight: bold;
}
.headerTable {
width: 100%;
height: 68px;
}
.systemMessage {
position: absolute;
top: 45%;
left: 50%;
transform: translateX(-55%) translateY(-50%);
2021-03-12 04:50:30 +01:00
-webkit-user-select: none;
cursor: default;
2020-04-20 01:38:33 +02:00
}
:root {
--header-table-border-color: rgba(0, 0, 0, 0.1);
--header-color: rgba(0, 0, 0, 0.3);
--body-code-color: #666;
--system-message-color: #cbcbcb;
2020-08-31 02:20:13 +02:00
--feedlink-color: rgba(255, 0, 0, 0.6);
2020-04-20 01:38:33 +02:00
--article-title-color: #333;
2020-08-31 02:20:13 +02:00
--article-date-color: rgba(0, 0, 0, 0.3);
2020-04-20 01:38:33 +02:00
--table-cell-border-color: lightgray;
}
@media(prefers-color-scheme: dark) {
:root {
--header-color: rgba(94, 158, 244, 1);
2020-04-20 01:38:33 +02:00
--body-code-color: #b2b2b2;
--system-message-color: #5f5f5f;
--feedlink-color: rgba(94, 158, 244, 1);
2020-04-20 01:38:33 +02:00
--article-title-color: #e0e0e0;
--article-date-color: rgba(255, 255, 255, 0.5);
2020-04-20 01:38:33 +02:00
--table-cell-border-color: dimgray;
}
}
body .headerTable {
border-bottom: 1px solid var(--header-table-border-color);
2020-08-31 02:20:13 +02:00
color: var(--header-color);
2020-04-20 01:38:33 +02:00
}
body .header {
color: var(--header-color);
}
body .header a:link, .header a:visited {
2020-04-20 01:38:33 +02:00
color: var(--header-color);
}
body code, body pre {
color: var(--body-code-color);
}
body > .systemMessage {
color: var(--system-message-color);
}
.feedlink a:link, .feedlink a:visited {
2020-08-19 19:48:20 +02:00
color: var(--feedlink-color);
2020-04-20 01:38:33 +02:00
}
.avatar img {
border-radius: 4px;
}
.feedIcon {
border-radius: 4px;
}
.rightAlign {
text-align: end;
2020-04-20 01:38:33 +02:00
}
.leftAlign {
text-align: start;
2020-04-20 01:38:33 +02:00
}
.articleTitle a:link, .articleTitle a:visited {
color: var(--article-title-color);
margin-top: 26px;
}
.articleDateline {
margin-bottom: 5px;
2020-04-20 01:38:33 +02:00
font-weight: bold;
}
.articleDateline a:link, .articleDateline a:visited {
color: var(--article-date-color);
}
.articleDatelineTitle {
margin-bottom: 5px;
font-weight: bold;
}
.articleDatelineTitle a:link, .articleDatelineTitle a:visited {
2020-04-20 01:38:33 +02:00
color: var(--article-title-color);
}
.externalLink {
margin-bottom: 5px;
font-style: italic;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
2020-04-20 01:38:33 +02:00
.articleBody {
margin-top: 20px;
2020-04-20 01:38:33 +02:00
line-height: 1.6em;
}
2020-04-20 01:38:33 +02:00
h1 {
line-height: 1.15em;
font-weight: bold;
padding-bottom: 0;
margin-bottom: 5px;
2020-04-20 01:38:33 +02:00
}
pre {
max-width: 100%;
margin: 0;
overflow: auto;
overflow-y: hidden;
word-wrap: normal;
word-break: normal;
}
pre {
line-height: 1.4286em;
}
2020-04-20 01:38:33 +02:00
code, pre {
font-family: "SF Mono", Menlo, "Courier New", Courier, monospace;
font-size: 1em;
2020-04-20 01:38:33 +02:00
-webkit-hyphens: none;
}
pre code {
letter-spacing: -.027em;
font-size: 0.9375em;
}
2020-04-20 01:38:33 +02:00
.nnw-overflow {
overflow-x: auto;
}
/*
Instead of the last-child bits, border-collapse: collapse
could have been used. However, then the inter-cell borders
overlap the table border, which looks bad.
*/
.nnw-overflow table {
margin-bottom: 1px;
border-spacing: 0;
border: 1px solid var(--secondary-accent-color);
font-size: inherit;
}
.nnw-overflow table table {
margin-bottom: 0;
border: none;
}
.nnw-overflow td, .nnw-overflow th {
-webkit-hyphens: none;
word-break: normal;
border: 1px solid var(--table-cell-border-color);
border-top: none;
border-left: none;
padding: 5px;
}
.nnw-overflow tr :matches(td, th):last-child {
2020-04-20 01:38:33 +02:00
border-right: none;
}
.nnw-overflow :matches(thead, tbody, tfoot):last-child > tr:last-child :matches(td, th) {
2020-04-20 01:38:33 +02:00
border-bottom: none;
}
.nnw-overflow td pre {
border: none;
padding: 0;
}
.nnw-overflow table[border="0"] {
border-width: 0;
}
2020-04-20 01:38:33 +02:00
2020-07-16 16:21:42 +02:00
img, figure, video, div, object {
2020-04-20 01:38:33 +02:00
max-width: 100%;
height: auto !important;
margin: 0 auto;
}
iframe {
max-width: 100%;
margin: 0 auto;
}
iframe.nnw-constrained {
max-height: 50vw;
}
2020-04-20 01:38:33 +02:00
figure {
margin-bottom: 1em;
margin-top: 1em;
}
figcaption {
font-size: 14px;
line-height: 1.3em;
}
sup {
vertical-align: top;
position: relative;
bottom: 0.2rem;
}
sub {
vertical-align: bottom;
position: relative;
top: 0.2rem;
}
2021-02-27 03:09:40 +01:00
hr {
border: 1.5px solid var(--table-cell-border-color);
}
2020-04-20 01:38:33 +02:00
.iframeWrap {
position: relative;
display: block;
padding-top: 56.25%;
}
.iframeWrap iframe {
position: absolute;
top: 0;
left: 0;
height: 100% !important;
width: 100% !important;
}
blockquote {
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 15px;
border-inline-start: 3px solid var(--block-quote-border-color);
2020-04-20 01:38:33 +02:00
}
/* Feed Specific */
.feedbin--article-wrap {
border-top: 1px solid var(--header-table-border-color);
}
2021-07-27 20:37:31 +02:00
/* Hide the external link at the bottom of Daring Fireball posts */
.x-netnewswire-hide {
display: none;
}
2021-03-12 04:47:34 +01:00
/* see removeWpSmiley; this rule is kept in case a wp-smiley is encountered without alt text */
2021-07-27 20:37:31 +02:00
2020-04-20 01:38:33 +02:00
.wp-smiley {
height: 1em;
max-height: 1em;
}
/* Twitter */
.twitterAvatar {
vertical-align: middle;
border-radius: 4px;
2020-08-13 18:27:21 +02:00
height: 1.7em;
width: 1.7em;
}
.twitterUsername {
2020-08-13 18:27:21 +02:00
line-height: 1.2;
margin-left: 4px;
display: inline-block;
vertical-align: middle;
}
2020-08-13 18:27:21 +02:00
.twitterScreenName {
font-size: 66%;
}
.twitterTimestamp {
font-size: 66%;
}
2020-04-20 01:38:33 +02:00
/*Block ads and junk*/
iframe[src*="feedads"],
iframe[src*="doubleclick"],
iframe[src*="plusone.google"] {
display: none !important;
}
a[href*=".ads."],
a[href*="feedads"],
a[href*="doubleclick"],
a[href*="//ads."],
a[href*="api.tweetmeme"],
a[href*="delicious.com/post?"],
a[href*="digg.com/submit?"],
a[href*="google.com/bookmarks/mark?"],
a[href*="posterous.com/share?"],
a[href*="tumblr.com/share?"],
a[href*="linkedin.com/shareArticle?"],
a[href*="facebook.com/share.php?"],
a[href*="http://twitter.com/home?"],
a[href*="addtoany.com/share_save"] {
display: none !important;
}
img[src*=".ads."],
img[src*="//ads."],
img[src*="doubleclick"],
img[src*="feedads"],
img[src*="feedburner"],
img[src*="feedblitz"],
img[src*="share-buttons"] {
display: none !important;
}
/* Newsfoot specific styles. Structural styles come first, theme styles second */
.newsfoot-footnote-container {
position: relative;
display: inline-block;
z-index: 9999;
}
.newsfoot-footnote-popover {
position: absolute;
display: block;
padding: 0em 1em;
margin: 1em;
top: 0.75em;
max-width: none;
border-radius: 0.3em;
box-sizing: border-box;
}
.newsfoot-footnote-popover {
left: calc(-1 * (50vw - 1em));
right: calc(-1 * (50vw - 1em));
}
.newsfoot-footnote-popover-arrow {
content: '';
display: block;
width: 1em;
position: absolute;
top: -0.5em;
left: calc(50% - 0.5em);
height: 1em !important;
transform: rotate(45deg);
z-index:0;
}
.newsfoot-footnote-popover-inner {
border-radius: calc(0.3em - 1px);
padding: 1em;
position: relative;
z-index: 1;
}
.newsfoot-footnote-popover-inner :first-child {
margin-top: 0;
}
.newsfoot-footnote-popover-inner :last-child {
margin-bottom: 0;
}
.newsfoot-footnote-popover .reversefootnote,
.newsfoot-footnote-popover .footnoteBackLink,
.newsfoot-footnote-popover .footnote-return,
.newsfoot-footnote-popover a[href*='#fn'] {
2020-04-20 01:38:33 +02:00
display: none;
}
sup[id^='fn'] {
vertical-align: baseline;
}
a.footnote {
display: inline-block;
text-decoration: none;
padding: 0.05em 0.75em;
border-radius: 1em;
min-width: 1em;
text-align: center;
font-size: 0.8em;
line-height: 1em;
position:relative;
top: -0.1em;
}
/* light / default */
.newsfoot-footnote-popover {
background: #ccc;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 3px 6px rgba(0, 0, 0, 0.25);
color: black;
padding: 1px;
}
.newsfoot-footnote-popover-arrow {
background: #fafafa;
border: 1px solid #ccc;
}
.newsfoot-footnote-popover-inner {
background: #fafafa;
}
body a.footnote,
body a.footnote:visited,
.newsfoot-footnote-popover + a.footnote:hover {
background: #aaa;
color: white;
transition: background-color 200ms ease-out;
}
a.footnote:hover,
.newsfoot-footnote-popover + a.footnote {
background: #666;
transition: background-color 200ms ease-out;
}
/* dark */
@media screen and (prefers-color-scheme: dark) {
.newsfoot-footnote-popover {
background: #444;
color: rgb(224, 224, 224);
}
.newsfoot-footnote-popover-arrow {
background: #242424;
border: 1px solid #444;
}
.newsfoot-footnote-popover-inner {
background: #242424;
}
body a.footnote,
body a.footnote:visited,
.newsfoot-footnote-popover + a.footnote:hover {
background: #aaa;
color: white;
transition: background-color 200ms ease-out;
}
a.footnote:hover,
.newsfoot-footnote-popover + a.footnote {
background: #666;
transition: background-color 200ms ease-out;
}
}
/* iOS Specific */
@supports (-webkit-touch-callout: none) {
body {
margin-top: 3px;
margin-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
word-break: break-word;
-webkit-hyphens: auto;
-webkit-text-size-adjust: none;
}
:root {
color-scheme: light dark;
font: -apple-system-body;
font-size: [[font-size]]px;
--primary-accent-color: #086AEE;
--secondary-accent-color: #086AEE;
--block-quote-border-color: rgba(8, 106, 238, 0.75);
}
@media(prefers-color-scheme: dark) {
:root {
--primary-accent-color: #2D80F1;
--secondary-accent-color: #5E9EF4;
--block-quote-border-color: rgba(94, 158, 244, 0.75);
--header-table-border-color: rgba(255, 255, 255, 0.2);
}
}
body a, body a:visited {
color: var(--secondary-accent-color);
}
body .header {
font: -apple-system-body;
font-size: [[font-size]]px;
}
body .header a:link, body .header a:visited {
color: var(--primary-accent-color);
}
.avatar img {
border-radius: 4px;
}
pre {
border: 1px solid var(--secondary-accent-color);
padding: 5px;
}
.nnw-overflow table {
border: 1px solid var(--secondary-accent-color);
}
.activityIndicatorWrap {
position: relative;
}
.activityIndicator {
z-index: 1;
width: 64px;
height: 64px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
/* macOS Specific */
@supports not (-webkit-touch-callout: none) {
body {
margin-top: 20px;
margin-bottom: 64px;
padding-left: 48px;
padding-right: 48px;
font-family: -apple-system;
}
.smallText {
font-size: 14px;
}
.mediumText {
font-size: 16px;
}
.largeText {
font-size: 18px;
}
.xlargeText {
font-size: 20px;
}
.xxlargeText {
font-size: 22px;
}
:root {
color-scheme: light dark;
--accent-color: rgba(8, 106, 238, 1);
--block-quote-border-color: rgba(8, 106, 238, .50);
}
@media(prefers-color-scheme: dark) {
:root {
--accent-color: rgba(94, 158, 244, 1);
--block-quote-border-color: rgba(94, 158, 244, .50);
--header-table-border-color: rgba(255, 255, 255, 0.1);
}
}
body a, body a:visited {
color: var(--accent-color);
}
pre {
border: 1px solid var(--accent-color);
padding: 10px;
}
.nnw-overflow table {
border: 1px solid var(--accent-color);
}
}