Quote:
Originally Posted by ElMiko
...the epub file might require having functionally the whole book duplicated inside so that it could toggle your at-rule?
|
Yes, that is; mainly about how to handle images.
Quote:
Code:
<div class="epub3Code epub2Code">
All the code for epub3 AND epub2 here...
</div>
|
No, no of that way. But you could have:
Code:
<div class="myStyle">
Your elements/blocks to be formated here
</div>
and in your .css stylesheet:
Code:
.myStyle { /* here the style for epub2 */
display: block;
margin-top: 3em;
etc...
}
@supports(display: flex) { /* if this is true, then we are under epub3 */
.myStyle { /* Here the style to be applied on epub3 */
display: flex;
margin-top: revert; /* or margin-top: 0; you'll see what is better, depends on each case */
etc...
}
}
So, in this case, the XHTML code is the same for both, epub2 and epub3, BUT the .css is different.