W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [css-text] useful 'hanging-punctuation: last' characters

From: Liam R. E. Quin <liam@w3.org>
Date: Sun, 29 Mar 2015 21:20:17 -0400
Message-ID: <1427678417.26001.35.camel@w3.org>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Sat, 2015-03-28 at 21:59 -0700, Brad Kemper wrote:
> > On Mar 28, 2015, at 2:45 PM, fantasai <
> > fantasai.lists@inkedblade.net> wrote:
> > 
> > > On 03/28/2015 09:50 AM, Brad Kemper wrote:
> > > 
> > > > On Mar 18, 2015, at 10:39 PM, fantasai <
> > > > fantasai.lists@inkedblade.net> wrote:
> > > > 
> > > > On 03/18/2015 02:08 AM, Koji Ishii wrote:
> > > > > 2015/03/11 2:42 "Brad Kemper" < brad.kemper@gmail.com<mailto:
> > > > > brad.kemper@gmail.com>>:
> > > > > 
> > > > > >    I would like the characters that can hang on the end of 
> > > > > > a line to include a colon. The use case is common when you 
> > > > > > have
> > > > > >    right aligned labels ending in a colon.  It looks weird 
> > > > > > when the lines wrap and the last word doesn't line up with 
> > > > > > the
> > > > > >    other words.
> > > > > > 
> > > > > >    Could colons be part of the hanging characters in 
> > > > > > 'hanging-punctuation: last'? Or could there be a new 
> > > > > > value, such as
> > > > > >    'hanging-punctuation: last-loose', that hangs the 
> > > > > > characters in the [Po] category?
> > > > > 
> > > > > I think it depends on author choices, scripts, etc. For 
> > > > > instance, Japanese will not want colons to be included.
> > > > > 
> > > > > I would like properties for finer controls be done in Level 
> > > > > 4. fantasai?
> > > > 
> > > > I'm not sure this is a case for hanging punctuation:
> > > > you don't want the colon to be in the margin, you
> > > > still want it to take up space. But you want it to be
> > > > in a separate "column" in the layout.
> > > 
> > > I'd be very happy to have it hanging in the right padding,
> > > actually, so that everything else lined up on the right.
> > > Or do you mean I wouldn't really get that anyway, due to
> > > variable kerning, etc. between the colon and the second
> > > to last letter?
> > 
> > If you have a table of words with 8px gap between each cell,
> > you don't want the cells that happen to end in a colon to have a 
> > 4ox gap because the colon is in the gap.
> 
> Sure I do. In my use case, if there is a gap or padding, it is both 
> for spacing the labels and for accommodating the colon. It is a case 
> where every label on the left typically ends in a colon, and even 
> those that don't should like up with the rest of the text, not with 
> the colon.
> 
> I'd be fine if it was a new value that caused this, so that it 
> didn't interfere with other use cases.
> 
> > You want extra padding corresponding to the colon to be added
> > to the lines in that cell that don't end in a colon.
> 
> That would work too, I guess.

People used to do this in Quark with a colon that was coloured the 
same as the background, or effectively transparent. Some more CSS-like 
ways to do it (and less likely to affect selection, searching, and 
image backgrounds) might be

(1) to access the width of another element that's already been 
rendered (i.e. earlier in the document), so that you could have a rule 
like 
  "th span.colon-width has width of element span#colon"
Implementos are probably running and hiding...

(2) A property to say "this element's width is ignored for box 
calculations" and put the the colon in a span with that property. Can 
also be used for overprinting.

(3) A property to add a list of characters/glyphs to hung punctuation 
within an element - you have to watch for a colon other than the one 
at the end of the paragraph, though, as that one should not hang.

Overall I'd favour (3) for this problem, optionally with a percentage 
for how far to hang the character, andyoud still have to put the colon 
in a span element or something.
Received on Monday, 30 March 2015 01:20:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC