Quote:
Originally Posted by Arios
Hi Ruben,
Right now I'm trying to learn HTML5 and CSS3 and your trick is very pertinente, with for example a kind of configuration like:
Code:
@media all and (max-width: 1024px)
But are you sure it applies either way to Sigil or epub? As you said there are no results within Sigil or in a eInk reader. However Sigil does not see the code "font-size: 4vw;" as incorrect.
Otherwise, I misunderstood the meaning of your post.
PS Hope it's not too hot in Rosario; relatively warm here in the "Great North"!
|
Hi Arios;
It's quite hot here (about 34 Cº) and still didn't start the summer
Now to your question. Yes, I'm sure; Sigil supports units like vw, vh, vmax and vmix. And also you can see it. Just do the following:
1. Apply the style with "vw" to one of your header (let's suppose that you have a <h1> tag like:
Code:
<h1>This is my test title</h1>
with the asociated style:
Code:
h1 {
font-size: 5vw;
text-align: center;
}
2. Now enable the Preview (if you don't have it enabled yet) by pressing the key F10. For convenience, set the Preview docked on the right side of Sigil.
3. Now make the Preview wider by dragging to the left, the left side of the Preview. As you can watch, the size of the <h1> title doesn't change but now do click on the Book View (I mean the window, not the tool in the toolbar). After that the wide of the text in Preview has changed!!!
4. Do again wider (or narrower) the Preview and do click in the Book View; the size of the text changes again (and if you do click in Preview, now the text in Book View changes too).
This property is great. Suppose you have a caption that looks great but if the user changes the ereaer font-size, caption will look ugly. Then by giving the caption a size in "vw" we'll be sure the caption always will have the same proportion of the screen, no matter its resolution, no matter the font-size set by users and without need to use media queries. The same is valid for titles and subtitles (supose you want a title always take only one line). As I said, is like the normal font becomes svg font! But remember that "vw", "vh", etc., is not only for text; they can be used for any sizing value (if ereaders support them

).
Regards
Rubén