viewsource.css (1985B)
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 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 :root { 6 color-scheme: light dark; 7 direction: ltr; 8 -moz-control-character-visibility: visible; 9 height: 100%; 10 } 11 12 #viewsource { 13 font-family: -moz-fixed; 14 font-weight: normal; 15 white-space: pre; 16 counter-reset: line; 17 height: 100%; 18 box-sizing: border-box; 19 margin: 0; 20 padding: 8px; 21 /* stylelint-disable-next-line media-query-no-invalid */ 22 @media -moz-pref("view_source.wrap_long_lines") { 23 white-space: pre-wrap; 24 word-wrap: break-word; 25 } 26 } 27 28 pre { 29 font: inherit; 30 color: inherit; 31 white-space: inherit; 32 } 33 34 span[id] { 35 display: block; 36 margin-left: 5ch; 37 } 38 39 span[id]::before { 40 content: counter(line) " "; 41 counter-increment: line; 42 user-select: none; 43 display: inline-block; 44 width: 5ch; 45 margin-left: -5ch; 46 text-align: right; 47 color: #ccc; 48 font-weight: normal; 49 font-style: normal; 50 } 51 52 /* stylelint-disable-next-line media-query-no-invalid */ 53 @media -moz-pref("view_source.syntax_highlight") { 54 .start-tag, 55 .end-tag { 56 color: light-dark(purple, #f55e5e); 57 font-weight: bold; 58 } 59 .comment { 60 color: light-dark(green, lightgreen); 61 font-style: italic; 62 } 63 .cdata { 64 color: light-dark(#cc0066, #f068ac); 65 } 66 .doctype, 67 .markupdeclaration { 68 color: light-dark(steelblue, lightgray); 69 font-style: italic; 70 } 71 .pi { 72 color: orchid; 73 font-style: italic; 74 } 75 .entity { 76 color: light-dark(#ff4500, #f18a65); 77 } 78 .text { 79 font-weight: normal; 80 } 81 .attribute-name { 82 font-weight: bold; 83 } 84 .attribute-value { 85 color: light-dark(blue, #97bbff); 86 font-weight: normal; 87 } 88 .error { 89 color: revert; 90 font-weight: bold; 91 background-color: rgba(231, 116, 113, 0.3); 92 text-decoration: underline wavy red 0.5px; 93 } 94 } 95 96 span:not(.error), 97 a:not(.error) { 98 unicode-bidi: embed; 99 }