{"action":"created","issue":{"url":"https://api.github.com/repos/readium/readium-css/issues/34","repository_url":"https://api.github.com/repos/readium/readium-css","labels_url":"https://api.github.com/repos/readium/readium-css/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/readium/readium-css/issues/34/comments","events_url":"https://api.github.com/repos/readium/readium-css/issues/34/events","html_url":"https://github.com/readium/readium-css/issues/34","id":300954125,"number":34,"title":"Document-global text size","user":{"login":"danielweck","id":625201,"avatar_url":"https://avatars3.githubusercontent.com/u/625201?v=4","gravatar_id":"","url":"https://api.github.com/users/danielweck","html_url":"https://github.com/danielweck","followers_url":"https://api.github.com/users/danielweck/followers","following_url":"https://api.github.com/users/danielweck/following{/other_user}","gists_url":"https://api.github.com/users/danielweck/gists{/gist_id}","starred_url":"https://api.github.com/users/danielweck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielweck/subscriptions","organizations_url":"https://api.github.com/users/danielweck/orgs","repos_url":"https://api.github.com/users/danielweck/repos","events_url":"https://api.github.com/users/danielweck/events{/privacy}","received_events_url":"https://api.github.com/users/danielweck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-28T09:40:52Z","updated_at":"2018-02-28T12:06:19Z","closed_at":null,"author_association":"MEMBER","body":"Hello @JayPanoz what do you think about CSS `text-size-adjust`?\r\nhttps://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust\r\n\r\nI am asking following the discussion in this issue:\r\nhttps://github.com/readium/readium-js-viewer/issues/686\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/readium/readium-css/issues/comments/369219637","html_url":"https://github.com/readium/readium-css/issues/34#issuecomment-369219637","issue_url":"https://api.github.com/repos/readium/readium-css/issues/34","id":369219637,"user":{"login":"JayPanoz","id":12599652,"avatar_url":"https://avatars3.githubusercontent.com/u/12599652?v=4","gravatar_id":"","url":"https://api.github.com/users/JayPanoz","html_url":"https://github.com/JayPanoz","followers_url":"https://api.github.com/users/JayPanoz/followers","following_url":"https://api.github.com/users/JayPanoz/following{/other_user}","gists_url":"https://api.github.com/users/JayPanoz/gists{/gist_id}","starred_url":"https://api.github.com/users/JayPanoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JayPanoz/subscriptions","organizations_url":"https://api.github.com/users/JayPanoz/orgs","repos_url":"https://api.github.com/users/JayPanoz/repos","events_url":"https://api.github.com/users/JayPanoz/events{/privacy}","received_events_url":"https://api.github.com/users/JayPanoz/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T12:06:19Z","updated_at":"2018-02-28T12:06:19Z","author_association":"COLLABORATOR","body":"So the good news is that the number isn’t truncated in my tests. \r\n\r\nThe bad news is that it’s even worse: \r\n\r\n![cap1](https://user-images.githubusercontent.com/12599652/36785658-dda991da-1c83-11e8-9d7f-c53697df264c.png)\r\n\r\n![cap2](https://user-images.githubusercontent.com/12599652/36785661-e0c6c8e2-1c83-11e8-8d4f-677cbd5ba7a0.png)\r\n\r\nWhich can be explained by the following\r\n\r\n![css](https://user-images.githubusercontent.com/12599652/36785674-ed8bca50-1c83-11e8-83ea-6325221f8bf0.png)\r\n\r\nAs you can see, they’re using a different unit (`em` instead of `rem`) for list items with double digits.\r\n\r\nWhat this means is that `em` is computed against their `body`’s `font-size`, which is `0.7em` or `11.2px` while `rem` is computed against `100%` or `16px`. \r\n\r\nIn our normalize, we currently map everything to `1rem` (`16px`) as we have samples whose `font-size`s are set in `pt` or `px` for `body` and it breaks the cascade for relative units. \r\n\r\nThe stylesheet has been designed for iBooks only – they’re now even applying an iTunes DRM so that you can’t use another app to read the guides they publish. Now, iBooks is using the font-size API (UIWebview on iOS, Webview on MacOS) so this problem doesn’t apply (it even takes care of margins in `px` if I’m not mistaken), but we don’t have that in web browsers and that’s why we’ve been using this normalize, and you’ve been using JS in R1…\r\n\r\nI was failing to see how `-webkit-text-size-adjust` makes a difference there, as I didn’t notice any during my tests… until [I found this link](http://iphonedevsdk.com/forum/iphone-sdk-development/11942-globally-change-font-size-in-uiwebview.html).\r\n\r\nIt indeed works…\r\n\r\n![text-size-adjust-mobile](https://user-images.githubusercontent.com/12599652/36786584-35764860-1c87-11e8-9c44-4368f8179a11.png)\r\n\r\nProblem is there may be differences in behaviors as it is non-standard, and isn’t supported in some browsers (including Safari Desktop) so this won’t have any effect on desktop\r\n\r\n![text-size-adjust-desktop](https://user-images.githubusercontent.com/12599652/36786598-4361d912-1c87-11e8-8aa2-6f2600baf4e2.png)\r\n\r\nMind you, I’ll be happy to get rid of the normalize to prevent such edge cases, but it exists (and the JS solution too) because we don’t have anything cross-platform which does the job.\r\n\r\nAs for truncation, I guess it’s because, as any negative `text-indent` larger than the `margin|padding-left`, the risk is the first line overflowing on the left (+ rounding errors, especially as different units are used in this case).\r\n\r\nDoes this answer makes sense? "}}
{"actor":{"display_login":"JayPanoz"}}