From afa2f312f41505931568d2add5dbed2d1619175a Mon Sep 17 00:00:00 2001 From: Iosif Takakura Date: Fri, 5 Jul 2024 18:04:18 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=B7?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=8C=E9=81=A9=E7=94=A8=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sass/common/_contents.scss | 18 +- sass/common/_format.scss | 25 +- sass/vivliostyle-a4.scss | 5 + sass/vivliostyle-a5.scss | 5 + sass/vivliostyle-a6.scss | 5 + style.css | 503 ------------------------------------- 6 files changed, 49 insertions(+), 512 deletions(-) delete mode 100644 style.css diff --git a/sass/common/_contents.scss b/sass/common/_contents.scss index 6c4a75c..85d1cd3 100644 --- a/sass/common/_contents.scss +++ b/sass/common/_contents.scss @@ -37,9 +37,9 @@ figure > img[src$='.jpeg'] { } p > img, div > img, section > img { - width: auto; - max-width: $content-width; - max-height: $content-height; + max-inline-size: 100%; + max-block-size: 100vb; + object-fit: contain; } /* 奥付 */ @@ -108,11 +108,13 @@ div.note, div.memo, div.tip, div.info, div.warning, div.important, div.caution, } img.max { - margin: 0 !important; - max-width: 100vw; - width: auto; - max-height: 100vh; - height: auto; + margin-top: 0 !important; + margin-bottom: 0 !important; + margin-left: 0 !important; + margin-right: 0 !important; + max-inline-size: 100%; + max-block-size: 100vb; + object-fit: contain; } pre { diff --git a/sass/common/_format.scss b/sass/common/_format.scss index 1403997..96d6125 100644 --- a/sass/common/_format.scss +++ b/sass/common/_format.scss @@ -14,7 +14,8 @@ html { } @page { - size: $paper-width $paper-height; + size: $paper-size; + bleed: $bleed-size; // 行送り * 行数 width: $content-width; // フォントサイズ * 文字数 @@ -51,6 +52,9 @@ html { } } +@page :first { margin: 0 !important; } +@page :last { margin: 0 !important; } + @page :right { margin-left: $nodo; @@ -83,6 +87,11 @@ html { } @page cover { + size: $paper-size; + bleed: $bleed-size; + width: $paper-width; + height: $paper-height; + marks: $marks; margin-top: 0 !important; margin-bottom: 0 !important; margin-right: 0 !important; @@ -110,6 +119,11 @@ html { } @page title { + size: $paper-size; + bleed: $bleed-size; + width: $paper-width; + height: $paper-height; + marks: $marks; margin-top: 0 !important; margin-bottom: 0 !important; margin-right: 0 !important; @@ -150,6 +164,10 @@ html { } @page colophon { + size: $paper-size; + width: $paper-width; + height: $paper-height; + marks: $marks; margin-top: 0 !important; margin-bottom: 0 !important; margin-right: 0 !important; @@ -176,6 +194,11 @@ html { } @page backcover { + size: $paper-size; + bleed: $bleed-size; + width: $paper-width; + height: $paper-height; + marks: $marks; margin-top: 0 !important; margin-bottom: 0 !important; margin-right: 0 !important; diff --git a/sass/vivliostyle-a4.scss b/sass/vivliostyle-a4.scss index eefc790..7367a5d 100644 --- a/sass/vivliostyle-a4.scss +++ b/sass/vivliostyle-a4.scss @@ -22,6 +22,11 @@ $koguchi: 12mm; // ノド $nodo: 18mm; +//紙のサイズ +$paper-size: a4; +//塗り足しサイズ +$bleed-size: 3mm; + //紙の横幅 $paper-width: 210mm; //紙の縦幅 diff --git a/sass/vivliostyle-a5.scss b/sass/vivliostyle-a5.scss index 0e6bbca..205024f 100644 --- a/sass/vivliostyle-a5.scss +++ b/sass/vivliostyle-a5.scss @@ -22,6 +22,11 @@ $koguchi: 12mm; // ノド $nodo: 18mm; +//紙のサイズ +$paper-size: a5; +//塗り足しサイズ +$bleed-size: 3mm; + //紙の横幅 $paper-width: 148mm; //紙の縦幅 diff --git a/sass/vivliostyle-a6.scss b/sass/vivliostyle-a6.scss index 61fcca5..0a71685 100644 --- a/sass/vivliostyle-a6.scss +++ b/sass/vivliostyle-a6.scss @@ -22,6 +22,11 @@ $koguchi: 12mm; // ノド $nodo: 18mm; +//紙のサイズ +$paper-size: a6; +//塗り足しサイズ +$bleed-size: 3mm; + //紙の横幅 $paper-width: 105mm; //紙の縦幅 diff --git a/style.css b/style.css deleted file mode 100644 index 407bce2..0000000 --- a/style.css +++ /dev/null @@ -1,503 +0,0 @@ -@charset "utf-8"; -/* Tatujin-Publishing */ -/* Style sheet for epub */ -/* Ver.0.8b1 */ - -/* -Scale & Rhythm -line-height 1.6 -16px = 1em -x:p:h1:h2:h3 = 12px:14px:16px:24px:30px -*/ -* { -} -body { - margin: 0; - padding: 0; - font-size: 1em; - line-height:1.6; - font-family: "ShinGoPro-Regular","ShinGo-Regular", sans-serif; - /* - word-break: normal; - -webkit-line-break: after-white-space; - */ - -webkit-writing-mode: vertical-rl; - -epub-writing-mode: vertical-rl; - writing-mode: tb-rl; -} -p, ul, ol, dl, pre, table { - font-family: "ShinGo Regular","ShinGo R","新ゴR","新ゴ R", sans-serif; - font-size: 0.875em; -} -/* Heading */ -h1 { - margin: 0 0 3em; - padding: 0.5em 0 0; - border-top: 14px #326450 solid; - text-align: left; - font-size: 1.875em; - font-weight: bold; -} -h2 { - margin: 3em 0 0.5em; - padding: 0.5em 0 0; - border-top: 2px #326450 solid; - text-align: left; - font-size: 1.5em; - font-weight: bold; -} -h3 { - margin: 3em 0 0.5em; - padding: 0; - text-align: left; - font-size: 1em; - font-weight: bold; -} -h4, h5, h6 { - margin:0.7em 0; - padding: 0; - text-align: left; - line-height: 1.6; - font-weight: bold; -} -/* Paragraph */ -p { - margin:0.7em 0; - padding: 0; - text-align: left; - text-indent: 1em; - line-height: 1.6; -} -div.lead p { - color: #666; - line-height: 1.6; - font-size: 0.75em; -} -/* List */ -ul, ol { - margin: 2em 0 2em 2em; - padding: 0; - list-style-position: outside; -} -ul > li, -ol > li { - margin: 0 0 0.7em 0; - padding: 0; - line-height: 1.6; -} -dl { - margin: 2em 0; - padding: 0; -} -dt { - margin: 0; - padding: 0; - font-weight: bold; -} -dd { - margin: 0 0 1em 2em; - padding: 0; - line-height: 1.6; -} -/* Table -p.tablecaptionではなく -table caption {}を使う方が良いかも? -*/ -table { - margin: 0 auto 2em auto; - border-collapse: collapse; -} -table tr th { - background-color: #eee; - border:1px #aaa solid; - font-size: 0.75em; - font-weight: normal; -} -table tr td { - padding: 0.3em; - border:1px #aaa solid; - font-size: 0.75em; -} -p.tablecaption, table caption { - margin: 0; - color: #666; - font-size: 0.75em; - font-weight: bold; - text-indent: 0; -} -/* Quote */ -blockquote { - margin: 2em 0 2em 2em; - padding: 0.3em 1em; - border: 1px #aaa solid; -} -/* Column Block */ -div.column { - margin: 2em 0 2em 2em; - padding: 0.3em 1em; - background-color: #eee; - -webkit-border-radius: 0.7em; -} -div.column *{ - margin:0.7em 0; -} -div.column ul, -div.column ol { - list-style-position: inside; -} -/* Code Block */ -/* -※シンプルにできるかも -div.code {} -div.code pre.list, -div.code pre.cmd {} -div.code p.caption {} -*/ -div.code, div.caption-code, div.source-code, div.emlist-code, div.emlistnum-code { - margin: 1em 0 2em 2em; - padding: 0; -} -pre.emlist, pre.source, pre.list { - margin: 0; - padding: 5px; - border: 1px #aaa solid; -} -div p.caption { - margin: 0; - color: #666; - font-size: 0.75em; - font-weight: bold; -} -div.cmd-code pre.cmd { - margin: 0; - padding: 5px; - color: #ccc; - font-weight: bold; - background-color: #444; - -webkit-border-radius: 0.5em; -} -pre.cmd, pre.emlist, pre.list, pre.source { - white-space: pre-wrap; -} - -/* Image Block */ -/* div.image p.caption {} -※captionをそろえた方が良いかも?*/ -div.image { - margin: 2em auto; - padding: 0; -} -div.image img { - margin: 0 auto; - padding: 0; - display: block; -} -div.image p.caption { - margin: 0 auto; - text-align: center; - color: #666; - font-size: 0.75em; - font-weight: bold; - text-indent: 0; -} -/* Footnote Block */ -/* p.footnoteはいらないかも? */ -div.footnote { -} -div.footnote p.footnote { - color: #666; - line-height: 1.6; - font-size: 0.75em; - text-indent: 0; -} -/* Colophon */ -div.colophon { - margin: 3em auto; -} -div.colophon p { - text-indent: 0; -} -div.colophon p.title { - font-size: 1.5em; -} -div.colophon table { - margin: 1em 0 2em; - border: none; -} -div.colophon table tr th { - background-color: #fff; - font-size: 1.2em; - font-weight: normal; - border: none; -} -div.colophon table tr td { - font-size: 1.2em; - font-weight: normal; - border: none; -} - -/* Inline */ -a[href], -a:link, -a:visited { - border-bottom: 1px dotted #531084; - text-decoration: none; -} -b { - font-weight: bold; -} -strong{ - font-weight: bold; -} -em { - font-style: italic; -} -span.balloon { - font-size: 0.9em; -} -span.balloon:before { - content: "←"; -} - -/** - * from Rouge - */ -.highlight table td { padding: 5px; } -.highlight table pre { margin: 0; } -.highlight .cm { - color: #999988; - font-style: italic; -} -.highlight .cp { - color: #999999; - font-weight: bold; -} -.highlight .c1 { - color: #999988; - font-style: italic; -} -.highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; -} -.highlight .c, .highlight .cd { - color: #999988; - font-style: italic; -} -.highlight .err { - color: #a61717; - background-color: #e3d2d2; -} -.highlight .gd { - color: #000000; - background-color: #ffdddd; -} -.highlight .ge { - color: #000000; - font-style: italic; -} -.highlight .gr { - color: #aa0000; -} -.highlight .gh { - color: #999999; -} -.highlight .gi { - color: #000000; - background-color: #ddffdd; -} -.highlight .go { - color: #888888; -} -.highlight .gp { - color: #555555; -} -.highlight .gs { - font-weight: bold; -} -.highlight .gu { - color: #aaaaaa; -} -.highlight .gt { - color: #aa0000; -} -.highlight .kc { - color: #000000; - font-weight: bold; -} -.highlight .kd { - color: #000000; - font-weight: bold; -} -.highlight .kn { - color: #000000; - font-weight: bold; -} -.highlight .kp { - color: #000000; - font-weight: bold; -} -.highlight .kr { - color: #000000; - font-weight: bold; -} -.highlight .kt { - color: #445588; - font-weight: bold; -} -.highlight .k, .highlight .kv { - color: #000000; - font-weight: bold; -} -.highlight .mf { - color: #009999; -} -.highlight .mh { - color: #009999; -} -.highlight .il { - color: #009999; -} -.highlight .mi { - color: #009999; -} -.highlight .mo { - color: #009999; -} -.highlight .m, .highlight .mb, .highlight .mx { - color: #009999; -} -.highlight .sb { - color: #d14; -} -.highlight .sc { - color: #d14; -} -.highlight .sd { - color: #d14; -} -.highlight .s2 { - color: #d14; -} -.highlight .se { - color: #d14; -} -.highlight .sh { - color: #d14; -} -.highlight .si { - color: #d14; -} -.highlight .sx { - color: #d14; -} -.highlight .sr { - color: #009926; -} -.highlight .s1 { - color: #d14; -} -.highlight .ss { - color: #990073; -} -.highlight .s { - color: #d14; -} -.highlight .na { - color: #008080; -} -.highlight .bp { - color: #999999; -} -.highlight .nb { - color: #0086B3; -} -.highlight .nc { - color: #445588; - font-weight: bold; -} -.highlight .no { - color: #008080; -} -.highlight .nd { - color: #3c5d5d; - font-weight: bold; -} -.highlight .ni { - color: #800080; -} -.highlight .ne { - color: #990000; - font-weight: bold; -} -.highlight .nf { - color: #990000; - font-weight: bold; -} -.highlight .nl { - color: #990000; - font-weight: bold; -} -.highlight .nn { - color: #555555; -} -.highlight .nt { - color: #000080; -} -.highlight .vc { - color: #008080; -} -.highlight .vg { - color: #008080; -} -.highlight .vi { - color: #008080; -} -.highlight .nv { - color: #008080; -} -.highlight .ow { - color: #000000; - font-weight: bold; -} -.highlight .o { - color: #000000; - font-weight: bold; -} -.highlight .w { - color: #bbbbbb; -} -.highlight { - background-color: #f8f8f8; -} -.rouge-table { border-spacing: 0 } -.rouge-gutter { text-align: right } - -/** - * from EBPAJ EPUB 3 File Creation Guide sample style - * - * cf. http://ebpaj.jp/counsel/guide - */ - -/* image width definition(pacentage) */ -.width-010per { width: 10%; } -.width-020per { width: 20%; } -.width-025per { width: 25%; } -.width-030per { width: 30%; } -.width-033per { width: 33%; } -.width-040per { width: 40%; } -.width-050per { width: 50%; } -.width-060per { width: 60%; } -.width-067per { width: 67%; } -.width-070per { width: 70%; } -.width-075per { width: 75%; } -.width-080per { width: 80%; } -.width-090per { width: 90%; } -.width-100per { width: 100%; } - -span.tcy { - -webkit-text-combine: horizontal; - -ms-text-combine-horizontal: all; - text-combine-upright: all; -} \ No newline at end of file