aboutReader.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. /* Avoid adding ID selector rules in this style sheet, since they could
  5. * inadvertently match elements in the article content. */
  6. body {
  7. padding: 64px 51px;
  8. }
  9. body.loaded {
  10. transition: color 0.4s, background-color 0.4s;
  11. }
  12. body.light {
  13. color: #333333;
  14. background-color: #ffffff;
  15. }
  16. body.dark {
  17. color: #eeeeee;
  18. background-color: #333333;
  19. }
  20. body.dark *::-moz-selection {
  21. background-color: #FFFFFF;
  22. color: #0095DD;
  23. }
  24. body.dark a::-moz-selection {
  25. color: #DD4800;
  26. }
  27. body.sepia {
  28. color: #5b4636;
  29. background-color: #f4ecd8;
  30. }
  31. body.sans-serif,
  32. body.sans-serif .remove-button {
  33. font-family: Helvetica, Arial, sans-serif;
  34. }
  35. body.serif,
  36. body.serif .remove-button {
  37. font-family: Georgia, "Times New Roman", serif;
  38. }
  39. .container {
  40. --font-size: 12;
  41. max-width: 30em;
  42. margin: 0 auto;
  43. font-size: var(--font-size);
  44. }
  45. .container.content-width1 {
  46. max-width: 20em;
  47. }
  48. .container.content-width2 {
  49. max-width: 25em;
  50. }
  51. .container.content-width3 {
  52. max-width: 30em;
  53. }
  54. .container.content-width4 {
  55. max-width: 35em;
  56. }
  57. .container.content-width5 {
  58. max-width: 40em;
  59. }
  60. .container.content-width6 {
  61. max-width: 45em;
  62. }
  63. .container.content-width7 {
  64. max-width: 50em;
  65. }
  66. .container.content-width8 {
  67. max-width: 55em;
  68. }
  69. .container.content-width9 {
  70. max-width: 60em;
  71. }
  72. /* Override some controls and content styles based on color scheme */
  73. body.light > .container > .header > .domain {
  74. border-bottom-color: #333333 !important;
  75. }
  76. body.sepia > .container > .header > .domain {
  77. border-bottom-color: #5b4636 !important;
  78. }
  79. body.dark > .container > .header > .domain {
  80. border-bottom-color: #eeeeee !important;
  81. }
  82. body.sepia > .container > .footer {
  83. background-color: #dedad4 !important;
  84. }
  85. body.light blockquote {
  86. border-inline-start: 2px solid #333333 !important;
  87. }
  88. body.sepia blockquote {
  89. border-inline-start: 2px solid #5b4636 !important;
  90. }
  91. body.dark blockquote {
  92. border-inline-start: 2px solid #eeeeee !important;
  93. }
  94. /* Add toolbar transition base on loaded class */
  95. body.loaded .toolbar {
  96. transition: transform 0.3s ease-out;
  97. }
  98. body:not(.loaded) .toolbar:-moz-locale-dir(ltr) {
  99. transform: translateX(-100%);
  100. }
  101. body:not(.loaded) .toolbar:-moz-locale-dir(rtl) {
  102. transform: translateX(100%);
  103. }
  104. .light-button {
  105. color: #333333;
  106. background-color: #ffffff;
  107. }
  108. .dark-button {
  109. color: #eeeeee;
  110. background-color: #333333;
  111. }
  112. .sepia-button {
  113. color: #5b4636;
  114. background-color: #f4ecd8;
  115. }
  116. .sans-serif-button {
  117. font-family: Helvetica, Arial, sans-serif;
  118. }
  119. .serif-button {
  120. font-family: Georgia, "Times New Roman", serif;
  121. }
  122. /* Loading/error message */
  123. .reader-message {
  124. margin-top: 40px;
  125. display: none;
  126. text-align: center;
  127. width: 100%;
  128. font-size: 0.9em;
  129. }
  130. /* Header */
  131. .header {
  132. text-align: start;
  133. display: none;
  134. }
  135. .domain {
  136. font-size: 0.9em;
  137. line-height: 1.48em;
  138. padding-bottom: 4px;
  139. font-family: Helvetica, Arial, sans-serif;
  140. text-decoration: none;
  141. border-bottom: 1px solid;
  142. color: #0095dd;
  143. }
  144. .header > h1 {
  145. font-size: 1.6em;
  146. line-height: 1.25em;
  147. width: 100%;
  148. margin: 30px 0;
  149. padding: 0;
  150. }
  151. .header > .credits {
  152. font-size: 0.9em;
  153. line-height: 1.48em;
  154. margin: 0 0 10px 0;
  155. padding: 0;
  156. font-style: italic;
  157. }
  158. .header > .meta-data {
  159. font-size: 0.65em;
  160. margin: 0 0 15px 0;
  161. }
  162. /*======= Controls toolbar =======*/
  163. .toolbar {
  164. font-family: Helvetica, Arial, sans-serif;
  165. position: fixed;
  166. height: 100%;
  167. top: 0;
  168. left: 0;
  169. margin: 0;
  170. padding: 0;
  171. list-style: none;
  172. background-color: #fbfbfb;
  173. -moz-user-select: none;
  174. border-right: 1px solid #b5b5b5;
  175. z-index: 1;
  176. }
  177. .button {
  178. display: block;
  179. background-size: 24px 24px;
  180. background-repeat: no-repeat;
  181. color: #333;
  182. background-color: #fbfbfb;
  183. height: 40px;
  184. padding: 0;
  185. }
  186. .toolbar .button {
  187. width: 40px;
  188. background-position: center;
  189. margin-right: -1px;
  190. border-top: 0;
  191. border-left: 0;
  192. border-right: 1px solid #b5b5b5;
  193. border-bottom: 1px solid #c1c1c1;
  194. }
  195. .button[hidden] {
  196. display: none;
  197. }
  198. .dropdown {
  199. text-align: center;
  200. list-style: none;
  201. margin: 0;
  202. padding: 0;
  203. }
  204. .dropdown li {
  205. margin: 0;
  206. padding: 0;
  207. }
  208. /*======= Popup =======*/
  209. .dropdown-popup {
  210. min-width: 300px;
  211. text-align: start;
  212. position: absolute;
  213. left: 48px; /* offset to account for toolbar width */
  214. z-index: 1000;
  215. background-color: #fbfbfb;
  216. visibility: hidden;
  217. border-radius: 4px;
  218. border: 1px solid #b5b5b5;
  219. border-bottom-width: 0;
  220. box-shadow: 0 1px 3px #c1c1c1;
  221. }
  222. .keep-open .dropdown-popup {
  223. z-index: initial;
  224. }
  225. .dropdown-popup > hr {
  226. display: none;
  227. }
  228. .open > .dropdown-popup {
  229. visibility: visible;
  230. }
  231. .dropdown-arrow {
  232. position: absolute;
  233. top: 30px; /* offset arrow from top of popup */
  234. left: -16px;
  235. width: 16px;
  236. height: 24px;
  237. background-image: url("chrome://global/skin/reader/RM-Type-Controls-Arrow.svg");
  238. display: block;
  239. }
  240. /*======= Font style popup =======*/
  241. .font-type-buttons,
  242. .font-size-buttons,
  243. .color-scheme-buttons,
  244. .content-width-buttons,
  245. .line-height-buttons {
  246. display: flex;
  247. flex-direction: row;
  248. }
  249. .font-type-buttons > button:first-child {
  250. border-top-left-radius: 3px;
  251. }
  252. .font-type-buttons > button:last-child {
  253. border-top-right-radius: 3px;
  254. }
  255. .color-scheme-buttons > button:first-child {
  256. border-bottom-left-radius: 3px;
  257. }
  258. .color-scheme-buttons > button:last-child {
  259. border-bottom-right-radius: 3px;
  260. }
  261. .font-type-buttons > button,
  262. .font-size-buttons > button,
  263. .color-scheme-buttons > button,
  264. .content-width-buttons > button,
  265. .line-height-buttons > button {
  266. text-align: center;
  267. border: 0;
  268. }
  269. .font-type-buttons > button,
  270. .font-size-buttons > button,
  271. .content-width-buttons > button,
  272. .line-height-buttons > button {
  273. width: 50%;
  274. background-color: transparent;
  275. border-left: 1px solid #B5B5B5;
  276. border-bottom: 1px solid #B5B5B5;
  277. }
  278. .color-scheme-buttons > button {
  279. width: 33.33%;
  280. font-size: 14px;
  281. }
  282. .color-scheme-buttons > .dark-button {
  283. margin-top: -1px;
  284. height: 61px;
  285. }
  286. .font-type-buttons > button:first-child,
  287. .font-size-buttons > button:first-child,
  288. .content-width-buttons > button:first-child,
  289. .line-height-buttons > button:first-child {
  290. border-left: 0;
  291. }
  292. .font-type-buttons > button {
  293. display: inline-block;
  294. font-size: 62px;
  295. height: 100px;
  296. }
  297. .font-size-buttons > button,
  298. .color-scheme-buttons > button,
  299. .content-width-buttons > button,
  300. .line-height-buttons > button {
  301. height: 60px;
  302. }
  303. .font-type-buttons > button:active:hover,
  304. .font-type-buttons > button.selected,
  305. .color-scheme-buttons > button:active:hover,
  306. .color-scheme-buttons > button.selected {
  307. box-shadow: inset 0 -3px 0 0 #fc6420;
  308. }
  309. .font-type-buttons > button:active:hover,
  310. .font-type-buttons > button.selected {
  311. border-bottom: 1px solid #FC6420;
  312. }
  313. /* Make the serif button content the same size as the sans-serif button content. */
  314. .font-type-buttons > button > .description {
  315. color: #666;
  316. font-size: 12px;
  317. margin-top: -5px;
  318. }
  319. /* Font sizes are different per-platform, so we need custom CSS to line them up. */
  320. %ifdef XP_WIN
  321. .font-type-buttons > .sans-serif-button > .name {
  322. margin-top: 2px;
  323. }
  324. .font-type-buttons > .sans-serif-button > .description {
  325. margin-top: -4px;
  326. }
  327. .font-type-buttons > .serif-button > .name {
  328. font-size: 63px;
  329. }
  330. %else
  331. .font-type-buttons > .sans-serif-button > .name {
  332. margin-top: 5px;
  333. }
  334. .font-type-buttons > .sans-serif-button > .description {
  335. margin-top: -8px;
  336. }
  337. .font-type-buttons > .serif-button > .name {
  338. font-size: 70px;
  339. }
  340. %endif
  341. .button:hover,
  342. .font-size-buttons > button:hover,
  343. .font-type-buttons > button:hover,
  344. .content-width-buttons > button:hover,
  345. .line-height-buttons > button:hover {
  346. background-color: #ebebeb;
  347. }
  348. .dropdown.open,
  349. .button:active,
  350. .font-size-buttons > button:active,
  351. .font-size-buttons > button.selected,
  352. .content-width-buttons > button:active,
  353. .content-width-buttons > button.selected,
  354. .line-height-buttons > button:active,
  355. .line-height-buttons > button.selected {
  356. background-color: #dadada;
  357. }
  358. .minus-button,
  359. .plus-button,
  360. .content-width-minus-button,
  361. .content-width-plus-button,
  362. .line-height-minus-button,
  363. .line-height-plus-button {
  364. background-color: transparent;
  365. border: 0;
  366. background-size: 18px 18px;
  367. background-repeat: no-repeat;
  368. background-position: center;
  369. }
  370. /*======= Toolbar icons =======*/
  371. .close-button {
  372. background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close");
  373. height: 68px;
  374. background-position: center 8px;
  375. }
  376. .close-button:hover {
  377. background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close-hover");
  378. background-color: #d94141;
  379. border-bottom: 1px solid #d94141;
  380. border-right: 1px solid #d94141;
  381. }
  382. .close-button:hover:active {
  383. background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close-hover");
  384. background-color: #AE2325;
  385. border-bottom: 1px solid #AE2325;
  386. border-right: 1px solid #AE2325;
  387. }
  388. .style-button {
  389. background-image: url("chrome://global/skin/reader/RM-Type-Controls-24x24.svg");
  390. }
  391. .minus-button {
  392. background-image: url("chrome://global/skin/reader/RM-Minus-24x24.svg");
  393. }
  394. .plus-button {
  395. background-image: url("chrome://global/skin/reader/RM-Plus-24x24.svg");
  396. }
  397. .content-width-minus-button {
  398. background-size: 42px 16px;
  399. background-image: url("chrome://global/skin/reader/RM-Content-Width-Minus-42x16.svg");
  400. }
  401. .content-width-plus-button {
  402. background-size: 44px 16px;
  403. background-image: url("chrome://global/skin/reader/RM-Content-Width-Plus-44x16.svg");
  404. }
  405. .line-height-minus-button {
  406. background-size: 34px 14px;
  407. background-image: url("chrome://global/skin/reader/RM-Line-Height-Minus-38x14.svg");
  408. }
  409. .line-height-plus-button {
  410. background-size: 34px 24px;
  411. background-image: url("chrome://global/skin/reader/RM-Line-Height-Plus-38x24.svg");
  412. }
  413. @media print {
  414. .toolbar {
  415. display: none !important;
  416. }
  417. }
  418. /*======= Article content =======*/
  419. /* Note that any class names from the original article that we want to match on
  420. * must be added to CLASSES_TO_PRESERVE in ReaderMode.jsm, so that
  421. * Readability.js doesn't strip them out */
  422. .moz-reader-content {
  423. display: none;
  424. font-size: 1em;
  425. line-height: 1.6em;
  426. }
  427. .moz-reader-content.line-height1 {
  428. line-height: 1em;
  429. }
  430. .moz-reader-content.line-height2 {
  431. line-height: 1.2em;
  432. }
  433. .moz-reader-content.line-height3 {
  434. line-height: 1.4em;
  435. }
  436. .moz-reader-content.line-height4 {
  437. line-height: 1.6em;
  438. }
  439. .moz-reader-content.line-height5 {
  440. line-height: 1.8em;
  441. }
  442. .moz-reader-content.line-height6 {
  443. line-height: 2.0em;
  444. }
  445. .moz-reader-content.line-height7 {
  446. line-height: 2.2em;
  447. }
  448. .moz-reader-content.line-height8 {
  449. line-height: 2.4em;
  450. }
  451. .moz-reader-content.line-height9 {
  452. line-height: 2.6em;
  453. }
  454. @media print {
  455. .moz-reader-content p,
  456. .moz-reader-content code,
  457. .moz-reader-content pre,
  458. .moz-reader-content blockquote,
  459. .moz-reader-content ul,
  460. .moz-reader-content ol,
  461. .moz-reader-content li,
  462. .moz-reader-content figure,
  463. .moz-reader-content .wp-caption {
  464. margin: 0 0 10px 0 !important;
  465. padding: 0 !important;
  466. }
  467. }
  468. .moz-reader-content h1,
  469. .moz-reader-content h2,
  470. .moz-reader-content h3 {
  471. font-weight: bold;
  472. }
  473. .moz-reader-content h1 {
  474. font-size: 1.6em;
  475. line-height: 1.25em;
  476. }
  477. .moz-reader-content h2 {
  478. font-size: 1.2em;
  479. line-height: 1.51em;
  480. }
  481. .moz-reader-content h3 {
  482. font-size: 1em;
  483. line-height: 1.66em;
  484. }
  485. .moz-reader-content a:link {
  486. text-decoration: underline;
  487. font-weight: normal;
  488. }
  489. .moz-reader-content a:link,
  490. .moz-reader-content a:link:hover,
  491. .moz-reader-content a:link:active {
  492. color: #0095dd;
  493. }
  494. .moz-reader-content a:visited {
  495. color: #c2e;
  496. }
  497. .moz-reader-content * {
  498. max-width: 100%;
  499. height: auto;
  500. }
  501. .moz-reader-content p,
  502. .moz-reader-content p,
  503. .moz-reader-content code,
  504. .moz-reader-content pre,
  505. .moz-reader-content blockquote,
  506. .moz-reader-content ul,
  507. .moz-reader-content ol,
  508. .moz-reader-content li,
  509. .moz-reader-content figure,
  510. .moz-reader-content .wp-caption {
  511. margin: -10px -10px 20px -10px;
  512. padding: 10px;
  513. border-radius: 5px;
  514. }
  515. .moz-reader-content li {
  516. margin-bottom: 0;
  517. }
  518. .moz-reader-content li > ul,
  519. .moz-reader-content li > ol {
  520. margin-bottom: -10px;
  521. }
  522. .moz-reader-content p > img:only-child,
  523. .moz-reader-content p > a:only-child > img:only-child,
  524. .moz-reader-content .wp-caption img,
  525. .moz-reader-content figure img {
  526. display: block;
  527. }
  528. .moz-reader-content img[moz-reader-center] {
  529. margin-left: auto;
  530. margin-right: auto;
  531. }
  532. .moz-reader-content .caption,
  533. .moz-reader-content .wp-caption-text
  534. .moz-reader-content figcaption {
  535. font-size: 0.9em;
  536. line-height: 1.48em;
  537. font-style: italic;
  538. }
  539. .moz-reader-content code,
  540. .moz-reader-content pre {
  541. white-space: pre-wrap;
  542. }
  543. .moz-reader-content blockquote {
  544. padding: 0;
  545. padding-inline-start: 16px;
  546. }
  547. .moz-reader-content ul,
  548. .moz-reader-content ol {
  549. padding: 0;
  550. }
  551. .moz-reader-content ul {
  552. padding-inline-start: 30px;
  553. list-style: disc;
  554. }
  555. .moz-reader-content ol {
  556. padding-inline-start: 30px;
  557. list-style: decimal;
  558. }
  559. /* Hide elements with common "hidden" class names */
  560. .moz-reader-content .visually-hidden,
  561. .moz-reader-content .visuallyhidden,
  562. .moz-reader-content .hidden,
  563. .moz-reader-content .invisible,
  564. .moz-reader-content .sr-only {
  565. display: none;
  566. }
  567. /* Enforce wordpress and similar emoji/smileys aren't sized to be full-width */
  568. .moz-reader-content img.wp-smiley,
  569. .moz-reader-content img.emoji {
  570. display: inline-block;
  571. border-width: 0;
  572. /* height: auto is implied from `.moz-reader-content *` rule. */
  573. width: 1em;
  574. margin: 0 .07em;
  575. padding: 0;
  576. }