Git Product home page Git Product logo

Comments (4)

JayPanoz avatar JayPanoz commented on July 23, 2024 1

And to explain this bug…

Say you are in horizontal writing-mode and your cover is:

<html>
<body>
<h1><img alt="" src="my-cover.jpg" /></h1>
</body>
</html>

with the following CSS:

h1 {
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: 100%;
}

The image’s height is 100% of auto there so it can’t be computed, it will be sized depending on its max-width.

If the image has a height which is greater than the “page container”, it will be clipped as well. If you don’t want this to happen, you must do:

html, body {
  height: 100%;
}

h1 {
  margin: 0;
  padding: 0;
  height: 100%;
}

img {
  max-width: 100%;
  height: 100%;
}

Now the image is 100% of 100% (h1) of 100% (body) of 100% (html).

This is exactly what happens with TestSuite 130, except in vertical-writing-mode (+ svg) so it’s width instead of height.

from swift-toolkit.

JayPanoz avatar JayPanoz commented on July 23, 2024

re readium/readium-css#50 in ReadiumCSS

Note this file also has a CSS issue and the bug will apply without RS styles: readium/readium-css#50 (comment)

from swift-toolkit.

llemeurfr avatar llemeurfr commented on July 23, 2024

really we must put this sample on the bin until it's corrected. Senda spent too much time trying to get his code working with it.

from swift-toolkit.

JayPanoz avatar JayPanoz commented on July 23, 2024

Yeah agree. TestSuite 130 has been really getting on my nerves, there are fundamental issues with it but it keeps popping up every now and then with the cover and/or other issues.

For starters, it implements one of the most complex case we have to deal with at rendition: mixed writing-modes across contents (i.e. not in the same XHTML resource), a case very few Reading Systems handle properly and, on top of that, it is not addressed in the spec (not even guidance) so it’s entirely up to the interpretation of the implementer.

Mind you, I’m not suggesting such a test file isn’t useful but it adds another layer/case on top of the tests it is supposed to implement so that can add a lot of confusion (esp. as when writing-mode isn’t supported, CJK should be left-to-right – I’ve seen lots of people not familiar with CJK thinking it is right-to-left but writing-modedirection).

Then there’s the cover bug, which already fails in a vanilla web browser’s page.

capture d ecran 2018-08-03 a 15 19 25

I’m not sure it’s up to Reading Systems to fix this particular bug, it’s most probably up to the EPUB TestSuite maintainers.

from swift-toolkit.

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.