Giter VIP home page Giter VIP logo

Comments (8)

iaomw avatar iaomw commented on June 11, 2024

@JayPanoz

from readium-css.

JayPanoz avatar JayPanoz commented on June 11, 2024

Hmmm, I can see two issues in <head> at first sight:

  1. ReadiumCSS-before.css is loaded after all other stylesheets while it should come first (before authors’ stylesheet(s);
  2. the ReadiumCSS stylesheet used are the ones for CJK in vertical writing (for RTL, they should be the one in the RTL folder, which is this one)

Do you get the same result with the RTL stylesheets?

from readium-css.

JayPanoz avatar JayPanoz commented on June 11, 2024

Also, I would recommend dividing this sample into 2 because, in and of itself, it exactly is an edge case we agreed to not handle back in December 2017 as the EPUB spec provides zero guidance for it.

So it would be a better idea to isolate Japanese from Arabic/Hebrew.

from readium-css.

iaomw avatar iaomw commented on June 11, 2024

Hi, the order doesn't matter, it will have the same effect. I have double checked it in Safari.

This one in picture is modified by myself on Mac, so it has this order. Don't worry. The webpage generated by Streamer has correct order.

The book is using CJK vertical mainly, and this cover html is mark as xml:lang="ja"
Logically, we should use CJK vertical. What is the reason to use others?

I just checked the css file under rtl, it will have some difference but still been cut off.

from readium-css.

JayPanoz avatar JayPanoz commented on June 11, 2024

OK I’ll take a look and report back.

But if we end up discovering we need to isolate h1 wrapping svg or images from others, there’s nothing we can do in CSS to achieve that.

from readium-css.

iaomw avatar iaomw commented on June 11, 2024

Thanks. I also found if the h1 has a width:(some number smaller than the container): important!
It will also work fine. But I am not CSS expert. You guys should has better solutions.

from readium-css.

JayPanoz avatar JayPanoz commented on June 11, 2024

OK so I was able to reproduce this issue… without loading any ReadiumCSS stylesheet.

capture d ecran 2018-05-18 a 17 38 52

h1 indeed has no dimensions set (width and height) so it can’t constrain the nested SVG which is 100% of… nothing. This explains why putting a width on h1 works, as you reported in the comment above.

With ReadiumCSS Stylesheets loaded we got this (note columns are on the y-axis).

capture d ecran 2018-05-18 a 17 35 29

capture d ecran 2018-05-18 a 17 35 36

I’m reluctant to safeguard h1 there, as some may well be more than the width of the page so our best option is probably switching to viewport width (vw) there. But that is not a perfect solution as it will indeed create a blank page after.

I’ll try deploying the change on the develop branch ASAP so that we can see if it is good enough. But there’s not much we can do considering it doesn’t even work properly when kept untouched (and there’s consequently an authoring issue).

from readium-css.

llemeurfr avatar llemeurfr commented on June 11, 2024

As said before to @iaomw, this edge case EPUB sample must be put on the side for RTL study and only used for check if the issue we see here can be solved easily. We must not spend too much time on this.

from readium-css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.