- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Mon, 4 Dec 2017 11:49:05 -0800
- To: www-style@w3.org
On 11/28/2017 11:58 PM, Johannes Odland wrote: > Hi > > According to Selectors Level 3 the ::first-letter includes punctuation that precedes the first character. The example > specifically shows a dropped cap with an opening quotation mark. > > Although there are no hard and fast rules for initial caps, it is a common typographical practice to style the punctuation > different than the letter itself. The punctuation can hang in the margin, and be styled in the same font and font-size as the > body text so that the initial letter is flush with other initial letters that does not have punctuation. > > In Norwegian typography it is considered bad practice not to leave the letter itself flush with the other letters. > > http://theworldsgreatestbook.com/book-design-part-6/ > http://www.typografi.org/dropcaps/initialer.html > http://www.typografi.org/dropcaps/assets/lite-sitattegn_714.jpg > > As the spec is now it is hard to achieve good drop caps. > > Should there be a way to select the initial-punctuation also? This is a good point. I filed your comment under https://github.com/w3c/csswg-drafts/issues/2040 I'm not sure about the best way to resolve it, I guess we'd need a ::first-letter-letter pseudo. :P For hanging punctuation, the 'hanging-punctuation' property would work though: https://www.w3.org/TR/css-text-3/#hanging-punctuation-property p { hanging-punctuation: first; } /* Hang initial quotation mark */ h1 + p::first-letter { initial-letter: 3; } /* Drop cap */ ~fantasai
Received on Monday, 4 December 2017 19:49:39 UTC