Skip to content

slack q and a 2019 05 19

akabeko edited this page Nov 16, 2019 · 1 revision

2019-05-19

Time Icon Name Message
17:06 井二かける GitHubではbutameronとしてお世話になっております。よろしくお願いします。
https://twitter.com/kosys_pr/status/1129345475084029955 の件ですが、最小の再現コードは作れませんでしたが、今再現しているものを共有します。

以下の「図10 処理なし」の図がページからはみ出してしまっています。これがバグなのか使い方が悪いのかというのが分かりません。

https://vivliostyle.github.io/vivliostyle.js/viewer/vivliostyle-viewer.html#b=https://kosys.gitlab.io/kosys-newsletter-201906/print/manifest.json&f=epubcfi(/18!/4/2[app]/2/4/2/48/1:863[%E3%81%8C%E5%8F%AF%E8%83%BD%E3%81%A7%E3%81%82%E3%82%8B%E3%80%82%E3%81%9F,%E3%81%A0%E3%81%97%E3%80%81%E3%82%A2%E3%83%B3%E3%82%B7%E3%83%A3%E3%83%BC])&renderAllPages=true
※HTML版 https://kosys.gitlab.io/kosys-newsletter-201906/print/chapter2_tamamusi.html

CSSは、以下のような感じです。
.print img {
image-resolution: 300dpi
}

.print .low-resolution-image-container img {
image-resolution: 72dpi
}
.print figure>img {
min-width: auto!important;
max-width: 100%;
margin: 0 auto
}


図10は.low-resolution-image-containerの中にある、figure内のimgなので、本来はページからはみ出さずに横幅一杯にリサイズされるはずなのですが、何かうまくいってません。「min-width: auto!important;」が無視されているようです。
Vivliostyle、image-resolutionを指定するとmin-widthが上書きできなくなるっぽい? 再現コードを書く時間がないけれど。
17:11 井二かける #issues のほうに書いた方がいいですかね?
Clone this wiki locally