TEIC / Stylesheets

TEI XSL Stylesheets
235 stars 125 forks source link

separating elements in tei.css, margin or line height #96

Closed Dominique-M closed 9 years ago

Dominique-M commented 9 years ago

Some block elements should be separated by horizontal withespace. In HTML+CSS, this is usually done with some margin-top and margin-bottom. This is the case with the p element in HTML, which is not obvious because it is default, but appears by experimenting with margin: 0px; while line-height cannot reduce whitespace above and after without affecting the contents of p. In tei.css, this is obtained for titles with line-height. But the result is not only emphasis on the title by a separation from other blocks, but also a separation of all lines in the title, which in fact reduces the effect. Some authors or publishers may have decided to compose titles in more than one line, which calls for a lb in TEI, giving a br in HTML. In such books, the title is emphasized by some whitespace before and after, but not between the lines. See http://www.d-meeus.be/marxisme/classiques/Capital-IVchap17para8.html for an example of the unintended effect. The main title contains lb elements in the TEI source. I could of course handle the line-height in my own css, but I think more constructive for everybody to suggest the use of some margin-top and margin-bottom instead of line-height for h1, h2, h3 in tei.css.

sebastianrahtz commented 9 years ago

I am a little puzzled. It makes perfect sense in my mind to set extra line height in titles, designers almost always do so. and margin top/bottom as appropriate.

I have made some changes. See what you think

On 16 April 2015 at 21:11, Dominique Meeùs notifications@github.com wrote:

Some block elements should be separated by horizontal withespace. In HTML+CSS, this is usually done with some margin-top and margin-bottom. This is the case with the p element in HTML, which is not obvious because it is default, but appears by experimenting with margin: 0px; while line-height cannot reduce whitespace above and after without affecting the contents of p. In tei.css, this is obtained for titles with line-height. But the result is not only emphasis on the title by a separation from other blocks, but also a separation of all lines in the title, which in fact reduces the effect. Some authors or publishers may have decided to compose titles in more than one line, which calls for a lb in TEI, giving a br in HTML. In such books, the title is emphasized by some whitespace before and after, but not between the lines. See http://www.d-meeus.be/marxisme/classiques/Capital-IVchap17para8.html for an example of the unintended effect. The main title contains lb elements in the TEI source. I could of course handle the line-height in my own css, but I think more constructive for everybody to suggest the use of some margin-top and margin-bottom instead of line-height for h1, h2, h3 in tei.css.

— Reply to this email directly or view it on GitHub https://github.com/TEIC/Stylesheets/issues/96.

Sebastian Rahtz

Director (Research) of Academic IT

University of Oxford IT Services

13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

Não sou nada.

Nunca serei nada.

Não posso querer ser nada.

À parte isso, tenho em mim todos os sonhos do mundo.

Dominique-M commented 9 years ago

My point is: — there is no real need of line height because bigger fonts already include more space between lines; — the aim is to emphasize the tittle block as one block; with too much line height, the result is that a three lines title looks more like three blocks than like one important block; the unity of the title is lost. The changes seem a welcome improvement at first sight. (Much of my own CSS comes in the way in my real world pages. I should test pure TEI CSS on test pages to give you more feedback.) In h3, there is a typo with l.2em (letter l instead of number 1). By chance, my choice of font (Ubuntu mono 13) in Bluefish (and in gedit) makes it a big difference — and syntax colour too. The W3C validator gives more errors: line 854, unit missing after 860 (like 860px), and line 1044, import allowed only at the beginning of the file, before everything except charset and import.

sebastianrahtz commented 9 years ago

ah ok you've convinced me