Comments (1)
That’s right.
Actually this appears to be subdocumented in the spec.
I consequently created a very quick test in order to come with an explanation:
<!DOCTYPE html>
<html>
<head>
<title>Table Padding Test</title>
<style>table {
table-layout: auto;
border: 1px solid;
border-collapse: collapse;
}
td {
border: 1px solid;
padding: 10px 5%;
}</style>
</head>
<body>
<table>
<tr>
<th>type</th>
<th>values</th>
</tr>
<tr>
<td>Font Family</td>
<td>sans-serif | serif | monospace</td>
</tr>
<tr>
<td>Font Size</td>
<td>number in px</td>
</tr>
<tr>
<td>Theme</td>
<td>Light | Sepia | Dark</td>
</tr>
<tr>
<td>Rendition</td>
<td>reflowable | pre-paginated | paginated | scrolled-continuous | scrolled-doc | align-x-center | …</td>
</tr>
</table>
<button type="button">Relayout</button>
<script>
const trigger = document.querySelector("button");
const relayoutStyle = document.createElement("style");
relayoutStyle.id = "relayout";
document.head.appendChild(relayoutStyle);
const stylesheet = document.head.querySelector("#relayout");
trigger.addEventListener("click", (e) => {
e.preventDefault();
stylesheet.textContent = `body {font-size: 100%;}`;
}, false);
</script>
</body>
</html>
Turns out we never encountered the issue in testing because the Reading Systems we used are forcing a relayout e.g. applying their own styles, user settings, pagination, etc. That like even happens with a “poor-man’s pagination” stylesheet of mine.
If you’re clicking the relayout button in Webkit/Blink, the table will be laid out again but this time with the correct padding. In Firefox, it won’t – I can’t wait for the guys @ Microsoft to finish documenting all the table issues so that browsers can come up with a semblance of compat.
However this is the awful side effect of an EPUB’s idiosyncrasy, and not a voluntary trick – which would be really bad – so I’ll switch back to px
. Thanks for asking!
from blitz.
Related Issues (20)
- Feedback and Support HOT 3
- Portrait/full page image styling HOT 2
- small-caps text-tranform HOT 4
- figure page-break avoid causing issues on kindle HOT 8
- Review + test break-before and break-after HOT 1
- Consider removing AccessibilityAPI and AccessibilityControl from Template metadata, and keep only the essential items HOT 1
- Consider moving Kindle stylesheet into base
- Consider removing MQ plugin
- Internationalization HOT 1
- Cropped numbers in lists on iPhone HOT 3
- Please tag the 1.4.1 release HOT 1
- i18n: add support for no paragraph indents, standardized bottom margins HOT 11
- Tables: Why is td padding-left only 10px? HOT 3
- Why specify a fixed line height of 1.2 in typo.less? HOT 1
- [Reset] nav ol HOT 2
- Double-check clean-css optimisations HOT 1
- Add visual regression tests for dev HOT 1
- How to have asterisms inherit the text color? HOT 5
- [PSA] Sunsetting Blitz HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blitz.