Skip to content

Commit ca24827

Browse files
committed
User guide: add data-translate-ignore to CSS
1 parent f698096 commit ca24827

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

user_guide/en.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,16 +2351,16 @@
23512351

23522352
<p>Let's see this on an example <span class="ui">style tweak</span>:</p>
23532353

2354-
<p><b><span class="label_blue">img { width: 10px !important; height: 10px !important }</span></b></p>
2354+
<p><b><span class="label_blue" data-translate-ignore>img { width: 10px !important; height: 10px !important }</span></b></p>
23552355
<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>
23562356

23572357
<p>Now lets explain this tweak item by item:</p>
23582358

23592359
<ul>
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>
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>
23642364
</ul>
23652365

23662366
<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,31 +2373,31 @@
23732373

23742374
<ul>
23752375
<li><b>Add a separator line above each heading in a book:</b>
2376-
<p>H1, H2, H3, H4 { border-top: 2px solid black; }</p>
2376+
<p data-translate-ignore>H1, H2, H3, H4 { border-top: 2px solid black; }</p>
23772377
</li>
23782378

23792379
<li><b>Add some margin above the headings:</b>
2380-
<p>H1, H2, H3, H4 { margin-top: 2em !important; }</p></li>
2380+
<p data-translate-ignore>H1, H2, H3, H4 { margin-top: 2em !important; }</p></li>
23812381

23822382
<li><b>Or if the book have too much margin above the headings, remove them:</b>
2383-
<p>H1, H2, H3, H4 { margin-top: 0 !important; }</p>
2383+
<p data-translate-ignore>H1, H2, H3, H4 { margin-top: 0 !important; }</p>
23842384
</li>
23852385

23862386
<li><b>Add a small gap between paragraphs to make the text more readable:</b>
2387-
<p>p + p { margin-top: 0.5em !important; margin-bottom: 0.5em !important; }</p></li>
2387+
<p data-translate-ignore>p + p { margin-top: 0.5em !important; margin-bottom: 0.5em !important; }</p></li>
23882388

23892389
<li><b>Disable all images in an EPUB:</b>
2390-
<p>img { display: none !important; }</p>
2390+
<p data-translate-ignore>img { display: none !important; }</p>
23912391
</li>
23922392

23932393
<li>
23942394
<b>Make images very small instead of disabling them:</b>
2395-
<p>img { width: 10px !important; height: 10px !important }</p>
2395+
<p data-translate-ignore>img { width: 10px !important; height: 10px !important }</p>
23962396
</li>
23972397

23982398
<li>
23992399
<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>
2400+
<p data-translate-ignore>
24012401
pre,code {
24022402
font-size: 0.6em !important;
24032403
line-height: 1.8em !important;

0 commit comments

Comments
 (0)