Skip to content

Commit d39021e

Browse files
fix indenting for <l> and placement of '-M' and '-F' blocks
1 parent 2965e64 commit d39021e

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

resources/sass/components/_tei.scss

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $tei_list-indent: $font-size-base;
9494
}
9595

9696
div.poem {
97-
margin: 0.5pc 0em 0.5pc 10%;
97+
margin: 0.5pc 0em 0.5pc 10%;
9898
}
9999

100100
div.poem h2 {
@@ -167,9 +167,9 @@ li.listSubTitle {
167167
}
168168
}
169169

170-
/*
171-
<signed> und <seg> werden als 'block' gesetzt,
172-
damit die Textausrichtung (s.u.) modifiziert werden kann
170+
/*
171+
<signed> und <seg> werden als 'block' gesetzt,
172+
damit die Textausrichtung (s.u.) modifiziert werden kann
173173
*/
174174
.tei_signed, .tei_segBlock {
175175
display: block;
@@ -187,8 +187,8 @@ li.listSubTitle {
187187
text-align: left;
188188
}
189189

190-
/* set titles of biblio entries in italics and
191-
* set neste tei_hi_italic in normal shape
190+
/* set titles of biblio entries in italics and
191+
* set neste tei_hi_italic in normal shape
192192
*/
193193
.biblio-entry {
194194
.title, .journalTitle, .collectionTitle {
@@ -239,15 +239,15 @@ li.listSubTitle {
239239
}
240240

241241
/*
242-
* address within div/@type="address"
242+
* address within div/@type="address"
243243
*/
244244
.teiLetter_address {
245245
margin-bottom:$line-height-computed;
246246
p { margin-bottom: 0px; }
247247
}
248248

249249
/*
250-
* address within closer
250+
* address within closer
251251
*/
252252
.tei_closer .tei_address {
253253
margin-top:$line-height-computed;
@@ -290,11 +290,13 @@ li.listSubTitle {
290290
.teiSrc_text {
291291
--page-width: min(50ch, 92vw);
292292
--indent: 5ch;
293+
--lg-indent-amount: 0;
294+
--l-indent-amount: 0;
293295

294296
max-width: var(--page-width);
295297
margin: 0 auto;
296298
text-align: center;
297-
299+
298300
/* styling for page breaks – a mix from WeGA diaries and HenDi page breaks */
299301
hr.tei_pb-text {
300302
width: var(--page-width);
@@ -303,11 +305,11 @@ li.listSubTitle {
303305
position: relative;
304306
left: 50%;
305307
transform: translateX(-50%);
306-
308+
307309
border: 0;
308310
border-top: 2px solid var(--primary);
309311
border-radius: 5px;
310-
312+
311313
&::after {
312314
content: attr(data-content);
313315
position: absolute;
@@ -316,19 +318,19 @@ li.listSubTitle {
316318
top: 0;
317319
transform: translate(-50%, -50%);
318320
padding: 0 1rem;
319-
321+
320322
background: #fff;
321323
color: var(--primary);
322324
font-size: .8rem;
323325
font-style: italic;
324326
}
325327
}
326-
328+
327329
/* some block level elements */
328330
.tei_titlePart,
329331
.tei_castList,
330332
.tei_castItem,
331-
.tei_caption,
333+
.tei_caption,
332334
.tei_speaker,
333335
[class^="lg"],
334336
[class^="verseLine"],
@@ -343,7 +345,7 @@ li.listSubTitle {
343345
.tei_subst + .tei_subst::before {
344346
content: " ";
345347
}
346-
348+
347349
.teiSrc_front {
348350
.tei_titlePage {
349351
.tei_titlePart {
@@ -354,22 +356,22 @@ li.listSubTitle {
354356
.tei_castList {
355357
line-height: 2;
356358
margin-bottom: 1rem;
357-
359+
358360
.tei_castItem {
359361
text-align: left;
360-
362+
361363
.tei_role + .tei_roleDesc::before {
362364
content: " ";
363365
}
364366
}
365-
367+
366368
/* styling for cast groups with optional brackets to the right */
367369
[class^="tei_castGroup"] {
368370
display: grid;
369371
grid-template-columns: max-content max-content auto;
370372
align-items: stretch;
371373
column-gap: .5rem;
372-
374+
373375
> .tei_castItem {
374376
grid-column: 1;
375377
}
@@ -398,7 +400,7 @@ li.listSubTitle {
398400
}
399401
}
400402
}
401-
403+
402404
.teiSrc_body {
403405
/* general page layout, spacing, and indenting */
404406
.tei_sp {
@@ -408,22 +410,22 @@ li.listSubTitle {
408410
&:has(+ [class^="lg"]) {
409411
margin-bottom: 2rem;
410412
}
411-
/* indenting for lg up to indent-5 */
413+
/* set lg indent modifier up to indent-5 */
412414
&[class*="indent"] {
413415
&[class$="-1"] {
414-
margin-left: var(--indent);
416+
--lg-indent-amount: 1;
415417
}
416418
&[class$="-2"] {
417-
margin-left: calc(var(--indent) * 2);
419+
--lg-indent-amount: 2;
418420
}
419421
&[class$="-3"] {
420-
margin-left: calc(var(--indent) * 3);
422+
--lg-indent-amount: 3;
421423
}
422424
&[class$="-4"] > * {
423-
margin-left: calc(var(--indent) * 4);
425+
--lg-indent-amount: 4;
424426
}
425427
&[class$="-5"] > * {
426-
margin-left: calc(var(--indent) * 5);
428+
--lg-indent-amount: 5;
427429
}
428430
}
429431
}
@@ -433,34 +435,32 @@ li.listSubTitle {
433435
[class^="verseLine"] {
434436
margin: 0 auto;
435437
text-align: left;
436-
&[class$="-F"] {
437-
transform: translateX(-50%);
438-
text-align: center;
439-
margin-left: calc(var(--page-width) / 2);
440-
}
441438
&[class$="-M"] {
442-
transform: translateX(-50%);
439+
margin-left: calc(var(--page-width) / 4);
440+
}
441+
&[class$="-F"] {
442+
margin-left: calc(var(--page-width) / 4);
443443
text-align: center;
444-
margin-left: calc(var(--page-width) / 3);
445444
}
446445
/* indenting for verseLines up to indent-5 */
447446
&[class*="indent"] {
448447
&[class$="-1"] {
449-
text-indent: var(--indent);
448+
--l-indent-amount: 1;
450449
}
451450
&[class$="-2"] {
452-
text-indent: calc(var(--indent) * 2);
451+
--l-indent-amount: 2;
453452
}
454453
&[class$="-3"] {
455-
text-indent: calc(var(--indent) * 3);
454+
--l-indent-amount: 3;
456455
}
457456
&[class$="-4"] > * {
458-
text-indent: calc(var(--indent) * 4);
457+
--l-indent-amount: 4;
459458
}
460459
&[class$="-5"] > * {
461-
text-indent: calc(var(--indent) * 5);
460+
--l-indent-amount: 5;
462461
}
463462
}
463+
text-indent: calc((var(--indent) * var(--l-indent-amount)) + (var(--indent) * var(--lg-indent-amount)));
464464
}
465465
}
466466

0 commit comments

Comments
 (0)