Commit 3de80d1a authored by Julie's avatar Julie

clean ct+cst+cau relative values

parent c3b78567
......@@ -3,14 +3,21 @@ $fontSize: 13px;
$lineHeight: 17px;
*/
$fontSize-ct : 24px;
$lineHeight-ct: $lineHeight*2;
$ct-fontSize : 24px;
$ct-lineHeight: $lineHeight*2;
$cst-fontSize : 17px;
$cst-lineHeight : 21px;
$cau-fontSize : $fontSize;
$cau-lineHeight : $lineHeight;
.ct {
margin-top: 42px;
padding-left: 55px;
padding-right: 55px;
font-size: $fontSize-ct;
line-height: $lineHeight-ct;
font-size: $ct-fontSize;
line-height: $ct-lineHeight;
text-transform: none;
font-weight: 400;
text-align: center;
......@@ -34,14 +41,13 @@ $lineHeight-ct: $lineHeight*2;
}
}
$font-size-cst : 17px;
$line-height-cst : 21px;
.cst {
padding-left: 55px;
padding-right: 55px;
font-size: $font-size-cst;
line-height: $line-height-cst;
font-size: $cst-fontSize;
line-height: $cst-lineHeight;
font-style: italic;
text-align: center;
......@@ -52,8 +58,8 @@ $line-height-cst : 21px;
.cau {
padding-left: 35px;
padding-right: 35px;
line-height : $lineHeight;
font-size: $fontSize;
line-height : $cau-lineHeight;
font-size: $cau-fontSize;
margin-top: 13px;
text-indent: 0;
text-align: center;
......@@ -109,45 +115,55 @@ hgroup {
/* CLEAN */
/* Spec : Body of book begins first line on 18th normal text line. If display runs deep, allow at least 4p6 (70px here) below to chapter opening.
/* Spec : Body of book begins first line on 18th normal text line. If display runs deep, allow at least 4p6 (70px here, approximately
$lineHeight*4) below to chapter opening.
*/
/* Select chap title alone ou cst précédé de ct ou cau précédé de ct ...*/
$margin-bott-ct : 166px;
$space-ct-co : 11px; // +11px ($ct-fontSize - $fontSize ?) begin first paragraphe on baseline
$ct-marginBottom : $lineHeight*9 + $space-ct-co;
.ct{
margin-bottom: $margin-bott-ct;
margin-bottom: $ct-marginBottom;
}
/* Space between chapter title (ct) and chapter subtitle ----------------------------- */
/* Space between chapter title (ct) and chapter subtitle (cst) ----------------------------- */
$space-ct-cst : 8px;
$cst-marginTop : -$ct-marginBottom + $space-ct-cst;
// "-$ct-marginBottom" canceled margin bottom after ct alone
// and + 8px ($lineHeight-cst - $fontSize ?) beginnig cst on the second baseline after ct
.cst{
margin-top: -158px; /* beginnig cst on the second baseline after ct */
margin-top: $cst-marginTop;
}
/* Space between chapter subtitle (cst) and first chapter opening -------------------- */
/* Chapter Subtitle (1 line) */
$margin-bott-cst1 : 135px;
$cst1-marginBottom : $lineHeight*8;
.cst:not(.cst-2):not(.cst-3):not(.cst-4){
margin-bottom: $margin-bott-cst1; /* Body of book begins first line on 18th normal text line */
margin-bottom: $cst1-marginBottom;
}
/* Chapter Subtitle 2 lines */
$margin-bott-cst2 : $margin-bott-cst1 - $line-height-cst;
$cst2-marginBottom: $cst1-marginBottom - $cst-lineHeight;
.cst-2{
margin-bottom: $margin-bott-cst2; /* 114 */
margin-bottom: $cst2-marginBottom;
}
/* Chapter Subtitle 3 lines */
$margin-bott-cst3 : $margin-bott-cst2 - $line-height-cst;
$cst3-marginBottom: $cst1-marginBottom - $cst-lineHeight*2;
.cst-3{
margin-bottom: $margin-bott-cst3; /* 93px */
margin-bottom: $cst3-marginBottom;
}
/* Chapter Subtitle 4 lines */
$margin-bott-cst4 : $margin-bott-cst3 - $line-height-cst;
$cst4-marginBottom: $cst1-marginBottom - $cst-lineHeight*3;
.cst-4{
margin-bottom: $margin-bott-cst4; /* 72px */
margin-bottom: $cst4-marginBottom;
}
......@@ -156,35 +172,45 @@ $margin-bott-cst4 : $margin-bott-cst3 - $line-height-cst;
/* Select cau below ct */
$space-ct-cau : 11px;
.ct + .cau{
margin-top: -153px; /* cau begins on the second baseline after ct */
margin-bottom: 138px; /* Body of book begins first line on 18th normal text line */
margin-top: -$ct-marginBottom + $space-ct-cau; /* cau begins on the second baseline after ct */
margin-bottom: $lineHeight*8; /* Body of book begins first line on 18th normal text line */
}
/* Select cau below cst 1 line */
$cst-cau: -117px;
$space-cst-cau : 16px; /* cau begins on the second baseline after cst 1 line */
$cst1-cau-marginTop : -$cst1-marginBottom + $space-cst-cau ;
$cst1-cau-marginBottom : $lineHeight*6; /* Body of book begins first line on 18th normal text line */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) + .cau{
margin-top: $cst-cau; /* cau begins on the second baseline after cst 1 line */
margin-bottom: 104px; /* Body of book begins first line on 18th normal text line */
margin-top : $cst1-cau-marginTop ;
margin-bottom: $cst1-cau-marginBottom;
}
/* Select cau below cst 2 lines */
$cst2-cau-marginTop : -$cst2-marginBottom + $space-cst-cau ;
$cst2-cau-marginBottom : $lineHeight*6 - $cst-lineHeight ; /* Body of book begins first line on 18th normal text line */
.cst-2 + .cau{
margin-top: $cst-cau + $line-height-cst;
margin-bottom: 83px; /* Body of book begins first line on 18th normal text line */
margin-top : $cst2-cau-marginTop ;
margin-bottom: $cst2-cau-marginBottom;
}
/* Select cau below cst 3 lines */
$cst3-cau-marginTop : -$cst3-marginBottom + $space-cst-cau ;
$cst3-cau-marginBottom : $lineHeight*6 - $cst-lineHeight*2 ; /* Body of book begins at least 4p6 (approximately $lineHeight*4 here) + "$lineHeight*2 - $cst-lineHeight*2" begin open chapter on baseline */
.cst-3 + .cau{
margin-top: $cst-cau + $line-height-cst*2;
margin-bottom: 79px; /* Body of book begins at least 4p6 (70px here) */
margin-top : $cst3-cau-marginTop ;
margin-bottom: $cst3-cau-marginBottom;
}
/* Select cau below cst 4 lines */
$cst4-cau-marginTop : -$cst4-marginBottom + $space-cst-cau ;
$cst4-cau-marginBottom : $lineHeight*8 - $cst-lineHeight*3 ; /* Body of book begins at least 4p6 (approximately $lineHeight*4 here) + "$lineHeight*4 - $cst-lineHeight*3" begin open chapter on baseline */
.cst-4 + .cau{
margin-top: $cst-cau + $line-height-cst*3;
margin-bottom: 75px; /* Body of book begins at least 4p6 (70px here) */
margin-top : $cst4-cau-marginTop ;
margin-bottom: $cst4-cau-marginBottom;
}
......@@ -199,7 +225,7 @@ $space-cep : 26px; /* space before the beginning of cep(o) and after the previou
/* Select cep(o) below ct */
.ct + .cep,
.ct + .cepo{
margin-top: -$margin-bott-ct + $space-cep; /* -166px (suppr margin bellow .ct) + 26px (space before cep)*/
margin-top: -140px; /* -166px (suppr margin bellow .ct) + 26px (space before cep)*/
}
/* Select cepsn of cep(o) below ct */
.ct ~ .cep + .cepsn,
......@@ -221,7 +247,7 @@ $space-cep : 26px; /* space before the beginning of cep(o) and after the previou
/* Select cep below cst 1 line */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) + .cep,
.cst:not(.cst-2):not(.cst-3):not(.cst-4) + .cepo{
margin-top: -$margin-bott-cst1 + $space-cep; /* -$margin-bott-cst1 (suppr margin bellow .cst 1 line) + space before cep */
//margin-top: -$cst1-marginBottom + $space-cep; /* -$margin-bott-cst1 (suppr margin bellow .cst 1 line) + space before cep */
}
/* Select cepsn of cep(o) below cst 1 line */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) ~ .cep + .cepsn,
......@@ -240,7 +266,7 @@ $space-cep : 26px; /* space before the beginning of cep(o) and after the previou
/* Select cep below cst 2 lines */
.cst-2 + .cep,
.cst-2 + .cepo{
margin-top: -$margin-bott-cst2 + $space-cep;
//margin-top: -$margin-bott-cst2 + $space-cep;
}
/* Select cepsn of cep(o) below cst 2 lines */
.cst-2 ~ .cep + .cepsn,
......@@ -259,7 +285,7 @@ $space-cep : 26px; /* space before the beginning of cep(o) and after the previou
/* Select cep below cst 3 lines */
.cst-3 + .cep,
.cst-3 + .cepo{
margin-top: -$margin-bott-cst3 + $space-cep;
//margin-top: -$margin-bott-cst3 + $space-cep;
}
/* Select cepsn of cep(o) below cst 3 lines */
.cst-3 ~ .cep + .cepsn,
......@@ -279,7 +305,7 @@ $space-cep : 26px; /* space before the beginning of cep(o) and after the previou
/* Select cep below cst 4 lines */
.cst-4 + .cep,
.cst-4 + .cepo{
margin-top: -$margin-bott-cst4 + $space-cep;
//margin-top: -$margin-bott-cst4 + $space-cep;
}
/* Select cepsn of cep(o) below cst 4 lines */
.cst-4 ~ .cep + .cepsn,
......@@ -301,7 +327,7 @@ $space-cep : 26px; /* space before the beginning of cep(o) and after the previou
.cau + .cep,
.cau + .cepo{
// margin-top: -$margin-bott-cst1 + $space-cep; /* -$margin-bott-cst1 (suppr margin bellow .cst 1 line) + space before cep */
margin-top: -$margin-bott-cst2 + $space-cep + 36px - 3px ;
//margin-top: -$margin-bott-cst2 + $space-cep + 36px - 3px ;
color:blue;
}
/* Select cepsn of cep(o) below cau */
......
......@@ -126,6 +126,7 @@ hgroup {
/* Select chap title alone ou cst précédé de ct ou cau précédé de ct ...*/
.ct{
margin-bottom: 166px;
color:blue;
}
/* Space between chapter title (ct) and chapter subtitle ----------------------------- */
......
......@@ -655,70 +655,66 @@ hgroup + p {
text-indent: 0; }
/* CLEAN */
/* Spec : Body of book begins first line on 18th normal text line. If display runs deep, allow at least 4p6 (70px here) below to chapter opening.
/* Spec : Body of book begins first line on 18th normal text line. If display runs deep, allow at least 4p6 (70px here, approximately
$lineHeight*4) below to chapter opening.
*/
/* Select chap title alone ou cst précédé de ct ou cau précédé de ct ...*/
.ct {
margin-bottom: 166px; }
margin-bottom: 164px; }
/* Space between chapter title (ct) and chapter subtitle ----------------------------- */
/* Space between chapter title (ct) and chapter subtitle (cst) ----------------------------- */
.cst {
margin-top: -158px;
/* beginnig cst on the second baseline after ct */ }
margin-top: -156px; }
/* Space between chapter subtitle (cst) and first chapter opening -------------------- */
/* Chapter Subtitle (1 line) */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) {
margin-bottom: 135px;
/* Body of book begins first line on 18th normal text line */ }
margin-bottom: 136px; }
/* Chapter Subtitle 2 lines */
.cst-2 {
margin-bottom: 114px;
/* 114 */ }
margin-bottom: 115px; }
/* Chapter Subtitle 3 lines */
.cst-3 {
margin-bottom: 93px;
/* 93px */ }
margin-bottom: 94px; }
/* Chapter Subtitle 4 lines */
.cst-4 {
margin-bottom: 72px;
/* 72px */ }
margin-bottom: 73px; }
/* Author (cau) -------------------------------------------------------------------------- */
/* Select cau below ct */
.ct + .cau {
margin-top: -153px;
/* cau begins on the second baseline after ct */
margin-bottom: 138px;
margin-bottom: 136px;
/* Body of book begins first line on 18th normal text line */ }
/* Select cau below cst 1 line */
/* cau begins on the second baseline after cst 1 line */
/* Body of book begins first line on 18th normal text line */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) + .cau {
margin-top: -117px;
/* cau begins on the second baseline after cst 1 line */
margin-bottom: 104px;
/* Body of book begins first line on 18th normal text line */ }
margin-top: -120px;
margin-bottom: 102px; }
/* Select cau below cst 2 lines */
/* Body of book begins first line on 18th normal text line */
.cst-2 + .cau {
margin-top: -96px;
margin-bottom: 83px;
/* Body of book begins first line on 18th normal text line */ }
margin-top: -99px;
margin-bottom: 81px; }
/* Select cau below cst 3 lines */
/* Body of book begins at least 4p6 (approximately $lineHeight*4 here) + "$lineHeight*2 - $cst-lineHeight*2" begin open chapter on baseline */
.cst-3 + .cau {
margin-top: -75px;
margin-bottom: 79px;
/* Body of book begins at least 4p6 (70px here) */ }
margin-top: -78px;
margin-bottom: 60px; }
/* Select cau below cst 4 lines */
/* Body of book begins at least 4p6 (approximately $lineHeight*4 here) + "$lineHeight*4 - $cst-lineHeight*3" begin open chapter on baseline */
.cst-4 + .cau {
margin-top: -54px;
margin-bottom: 75px;
/* Body of book begins at least 4p6 (70px here) */ }
margin-top: -57px;
margin-bottom: 73px; }
/* CEP(O) -------------------------------------------------------------------------- */
/* space before the beginning of cep(o) and after the previous element */
......@@ -745,11 +741,6 @@ hgroup + p {
/* CEP below cst -------------------------------------------------------------------------- */
/* Select cep below cst 1 line */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) + .cep,
.cst:not(.cst-2):not(.cst-3):not(.cst-4) + .cepo {
margin-top: -109px;
/* -$margin-bott-cst1 (suppr margin bellow .cst 1 line) + space before cep */ }
/* Select cepsn of cep(o) below cst 1 line */
.cst:not(.cst-2):not(.cst-3):not(.cst-4) ~ .cep + .cepsn,
.cst:not(.cst-2):not(.cst-3):not(.cst-4) ~ .cepo + .cepsn {
......@@ -764,10 +755,6 @@ hgroup + p {
margin-bottom: 68px; }
/* Select cep below cst 2 lines */
.cst-2 + .cep,
.cst-2 + .cepo {
margin-top: -88px; }
/* Select cepsn of cep(o) below cst 2 lines */
.cst-2 ~ .cep + .cepsn,
.cst-2 ~ .cepo + .cepsn {
......@@ -781,10 +768,6 @@ hgroup + p {
margin-bottom: 76px; }
/* Select cep below cst 3 lines */
.cst-3 + .cep,
.cst-3 + .cepo {
margin-top: -67px; }
/* Select cepsn of cep(o) below cst 3 lines */
.cst-3 ~ .cep + .cepsn,
.cst-3 ~ .cepo + .cepsn {
......@@ -798,10 +781,6 @@ hgroup + p {
margin-bottom: 68px; }
/* Select cep below cst 4 lines */
.cst-4 + .cep,
.cst-4 + .cepo {
margin-top: -46px; }
/* Select cepsn of cep(o) below cst 4 lines */
.cst-4 ~ .cep + .cepsn,
.cst-4 ~ .cepo + .cepsn {
......@@ -818,7 +797,6 @@ hgroup + p {
/* Select cep(o) below cau */
.cau + .cep,
.cau + .cepo {
margin-top: -55px;
color: blue; }
/* Select cepsn of cep(o) below cau */
......
......@@ -537,10 +537,10 @@
<hgroup>
<div class="dup">Chapitre de test</div>
<h1 class="ct">Chapitre de test<br/>Chapitre de test</h1>
<div class="cst">sous-titre sous-titre</div>
<h1 class="ct">Chapitre de test</h1>
<div class="cst cst-2">sous-titre<br/>sous-titre</div>
<!-- <div class="cau">George Wills</div> -->
<div class="cau">George Wills</div>
<!-- <div class="cep"> I began printing books with the hope of producing some which would have a difinite claim to beauty, while at the same time they should be easy to read and should not dazzle the eye, or trouble the intellect of the reader by eccentricity of form in the letters.</div> -->
<!-- <div class="cepsn">william morris, aims in founding the kelmscott press</div> -->
<!-- <div class="cep">I began printing books with the hope of producing some which would have a difinite claim to beauty, while at the same time they should be easy to read and should not dazzle the eye, or trouble the intellect of the reader by eccentricity of form in the letters.</div> -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment