|
2351 | 2351 |
|
2352 | 2352 | <p>Let's see this on an example <span class="ui">style tweak</span>:</p> |
2353 | 2353 |
|
2354 | | - <p><b><span class="label_blue" data-translate-ignore>img { width: 10px !important; height: 10px !important }</span></b></p> |
| 2354 | + <p><b><span class="label_blue">img { width: 10px !important; height: 10px !important }</span></b></p> |
2355 | 2355 | <p>In plain language this rule says: <b>"Ignore their original size and make all the images in this book 10 pixels wide and 10 pixels high."</b> So if you add this style tweak to KOReader, all the images in your book will be shown tiny.</p> |
2356 | 2356 |
|
2357 | 2357 | <p>Now lets explain this tweak item by item:</p> |
2358 | 2358 |
|
2359 | 2359 | <ul> |
2360 | | - <li><span class="ui" data-translate-ignore>img</span> - This is a CSS selector that targets all <b>img</b> (image) elements in the book.</li> |
2361 | | - <li><span class="ui" data-translate-ignore>{ width: 10px !important; height: 10px !important; }</span> - This is the declaration block. It contains the styles which will be applied to the selected <b>img</b> elements.</li> |
2362 | | - <li><span class="ui" data-translate-ignore>width: 10px !important;</span> - This first part sets the width of the targeted <b>img</b> elements to 10 pixels. The <b>!important</b> declaration is an override switch which ensures that your width value takes precedence over any other existing <b>width</b> declaration applied to these images.</li> |
2363 | | - <li><span class="ui" data-translate-ignore>height: 10px !important;</span> - This part sets the height of the targeted <b>img</b> elements to 10 pixels. Again, the <b>!important</b> declaration is an override switch which ensures that your height value takes precedence over any other existing <b>height</b> declaration applied to these images.</li> |
| 2360 | + <li><span class=ui>img</span> - This is a CSS selector that targets all <b>img</b> (image) elements in the book.</li> |
| 2361 | + <li><span class=ui>{ width: 10px !important; height: 10px !important; }</span> - This is the declaration block. It contains the styles which will be applied to the selected <b>img</b> elements.</li> |
| 2362 | + <li><span class=ui>width: 10px !important;</span> - This first part sets the width of the targeted <b>img</b> elements to 10 pixels. The <b>!important</b> declaration is an override switch which ensures that your width value takes precedence over any other existing <b>width</b> declaration applied to these images.</li> |
| 2363 | + <li><span class=ui>height: 10px !important;</span> - This part sets the height of the targeted <b>img</b> elements to 10 pixels. Again, the <b>!important</b> declaration is an override switch which ensures that your height value takes precedence over any other existing <b>height</b> declaration applied to these images.</li> |
2364 | 2364 | </ul> |
2365 | 2365 |
|
2366 | 2366 | <p>In summary, this CSS rule is designed to set a <b>fixed width and height of 10 pixels</b> for all <b>img</b> elements in your book, <b>ignoring their original style</b>.</p> |
|
2373 | 2373 |
|
2374 | 2374 | <ul> |
2375 | 2375 | <li><b>Add a separator line above each heading in a book:</b> |
2376 | | - <p data-translate-ignore>H1, H2, H3, H4 { border-top: 2px solid black; }</p> |
| 2376 | + <p>H1, H2, H3, H4 { border-top: 2px solid black; }</p> |
2377 | 2377 | </li> |
2378 | 2378 |
|
2379 | 2379 | <li><b>Add some margin above the headings:</b> |
2380 | | - <p data-translate-ignore>H1, H2, H3, H4 { margin-top: 2em !important; }</p></li> |
| 2380 | + <p>H1, H2, H3, H4 { margin-top: 2em !important; }</p></li> |
2381 | 2381 |
|
2382 | 2382 | <li><b>Or if the book have too much margin above the headings, remove them:</b> |
2383 | | - <p data-translate-ignore>H1, H2, H3, H4 { margin-top: 0 !important; }</p> |
| 2383 | + <p>H1, H2, H3, H4 { margin-top: 0 !important; }</p> |
2384 | 2384 | </li> |
2385 | 2385 |
|
2386 | 2386 | <li><b>Add a small gap between paragraphs to make the text more readable:</b> |
2387 | | - <p data-translate-ignore>p + p { margin-top: 0.5em !important; margin-bottom: 0.5em !important; }</p></li> |
| 2387 | + <p>p + p { margin-top: 0.5em !important; margin-bottom: 0.5em !important; }</p></li> |
2388 | 2388 |
|
2389 | 2389 | <li><b>Disable all images in an EPUB:</b> |
2390 | | - <p data-translate-ignore>img { display: none !important; }</p> |
| 2390 | + <p>img { display: none !important; }</p> |
2391 | 2391 | </li> |
2392 | 2392 |
|
2393 | 2393 | <li> |
2394 | 2394 | <b>Make images very small instead of disabling them:</b> |
2395 | | - <p data-translate-ignore>img { width: 10px !important; height: 10px !important }</p> |
| 2395 | + <p>img { width: 10px !important; height: 10px !important }</p> |
2396 | 2396 | </li> |
2397 | 2397 |
|
2398 | 2398 | <li> |
2399 | 2399 | <b>Make the code block sections in computer science books tidier and more readable (<a href="https://github.com/koreader/koreader/issues/9261#issuecomment-2508866126">Here you can see an example</a>):</b> |
2400 | | - <p data-translate-ignore> |
| 2400 | + <p> |
2401 | 2401 | pre,code { |
2402 | 2402 | font-size: 0.6em !important; |
2403 | 2403 | line-height: 1.8em !important; |
|
0 commit comments