narrate.css (4753B)
1 /* Avoid adding ID selector rules in this style sheet, since they could 2 * inadvertently match elements in the article content. */ 3 4 .narrating { 5 position: relative; 6 z-index: 1; 7 } 8 9 body.light .narrating { 10 background-color: #ffc; 11 } 12 13 body.sepia .narrating { 14 background-color: #e0d7c5; 15 } 16 17 body.dark .narrating { 18 background-color: #181411; 19 } 20 21 .narrate-word-highlight { 22 position: absolute; 23 display: none; 24 transform: translate(-50%, calc(-50% - 2px)); 25 z-index: -1; 26 border-bottom-style: solid; 27 border-bottom-width: 7px; 28 transition: left 0.1s ease, width 0.1s ease; 29 } 30 31 .narrating > .narrate-word-highlight { 32 display: inline-block; 33 } 34 35 .narrate-word-highlight.newline { 36 transition: none; 37 } 38 39 body.light .narrate-word-highlight { 40 border-bottom-color: #ffe087; 41 } 42 43 body.sepia .narrate-word-highlight { 44 border-bottom-color: #bdb5a5; 45 } 46 47 body.dark .narrate-word-highlight { 48 border-bottom-color: #6f6f6f; 49 } 50 51 .narrate-dropdown { 52 --border-color: #e5e5e5; 53 } 54 55 .narrate-toggle > svg { 56 display: block; 57 margin: 0 8px; 58 } 59 60 .narrate-dropdown > .dropdown-popup button { 61 background-color: transparent; 62 } 63 64 .narrate-dropdown > .dropdown-popup button:hover:not(:disabled) { 65 background-color: #181411; 66 } 67 68 .narrate-row { 69 display: flex; 70 align-items: center; 71 min-height: 40px; 72 box-sizing: border-box; 73 } 74 75 .narrate-row:not(:first-child) { 76 border-top: 1px solid var(--border-color); 77 } 78 79 /* Control buttons */ 80 81 .narrate-control > button { 82 background-size: 24px 24px; 83 background-repeat: no-repeat; 84 background-position: center center; 85 height: 64px; 86 width: 100px; 87 border: none; 88 color: #666; 89 box-sizing: border-box; 90 } 91 92 .narrate-control > button:not(:first-child) { 93 border-left: 1px solid var(--border-color); 94 } 95 96 .narrate-skip-previous { 97 border-top-left-radius: 3px; 98 background-image: url("chrome://global/skin/narrate/back.svg#enabled"); 99 -moz-context-properties: fill; 100 fill: rgb(128 128 128); 101 } 102 103 .narrate-skip-next { 104 border-top-right-radius: 3px; 105 background-image: url("chrome://global/skin/narrate/forward.svg#enabled"); 106 -moz-context-properties: fill; 107 fill: rgb(128 128 128); 108 } 109 110 .narrate-skip-previous:disabled { 111 background-image: url("chrome://global/skin/narrate/back.svg#disabled"); 112 } 113 114 .narrate-skip-next:disabled { 115 background-image: url("chrome://global/skin/narrate/forward.svg#disabled"); 116 } 117 118 .narrate-start-stop { 119 background-image: url("chrome://global/skin/narrate/start.svg"); 120 } 121 122 .narrate-dropdown.speaking .narrate-start-stop { 123 background-image: url("chrome://global/skin/narrate/stop.svg"); 124 } 125 126 /* Rate control */ 127 128 .narrate-rate::before, .narrate-rate::after { 129 content: ''; 130 width: 48px; 131 height: 40px; 132 background-position: center; 133 background-repeat: no-repeat; 134 background-size: 24px auto; 135 } 136 137 .narrate-rate::before { 138 background-image: url("chrome://global/skin/narrate/slow.svg"); 139 } 140 141 .narrate-rate::after { 142 background-image: url("chrome://global/skin/narrate/fast.svg"); 143 } 144 145 .narrate-rate-input { 146 margin: 0 1px; 147 flex-grow: 1; 148 } 149 150 .narrate-rate-input::-moz-range-track { 151 background-color: #979797; 152 height: 2px; 153 } 154 155 .narrate-rate-input::-moz-range-progress { 156 background-color: #2EA3FF; 157 height: 2px; 158 } 159 160 .narrate-rate-input::-moz-range-thumb { 161 background-color: #181411; 162 height: 16px; 163 width: 16px; 164 border-radius: 8px; 165 border-width: 0; 166 } 167 168 .narrate-rate-input:active::-moz-range-thumb { 169 background-color: #2EA3FF; 170 } 171 172 /* Voice selection */ 173 174 .voiceselect { 175 width: 100%; 176 } 177 178 .voiceselect > button.select-toggle, 179 .voiceselect > .options > button.option { 180 -moz-appearance: none; 181 border: none; 182 width: 100%; 183 min-height: 40px; 184 } 185 186 .voiceselect.open > button.select-toggle { 187 border-bottom: 1px solid var(--border-color); 188 } 189 190 .voiceselect > button.select-toggle::after { 191 content: ''; 192 background-image: url("chrome://global/skin/narrate/arrow.svg"); 193 background-position: center; 194 background-repeat: no-repeat; 195 background-size: 12px 12px; 196 display: inline-block; 197 width: 1.5em; 198 height: 1em; 199 vertical-align: middle; 200 } 201 202 .voiceselect > .options > button.option:not(:first-child) { 203 border-top: 1px solid var(--border-color); 204 } 205 206 .voiceselect > .options > button.option { 207 box-sizing: border-box; 208 } 209 210 .voiceselect > .options:not(.hovering) > button.option:focus { 211 background-color: #181411; 212 } 213 214 .voiceselect > .options:not(.hovering) > button.option:hover:not(:focus) { 215 background-color: transparent; 216 } 217 218 .voiceselect > .options > button.option::-moz-focus-inner { 219 outline: none; 220 border: 0; 221 } 222 223 .voiceselect > .options { 224 display: none; 225 overflow-y: auto; 226 } 227 228 .voiceselect.open > .options { 229 display: block; 230 } 231 232 .current-voice { 233 color: #7f7f7f; 234 } 235 236 .voiceselect:not(.open) > button, 237 .voiceselect .option:last-child { 238 border-radius: 0 0 3px 3px; 239 }