W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [CSS21][css3-text] letter-spacing, word-spacing and justification

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 14 Aug 2013 07:14:59 -0700 (PDT)
To: Stephen Zilles <szilles@adobe.com>
Cc: Bert Bos <bert@w3.org>, www-style@w3.org
Message-ID: <1620036983.3105884.1376489699277.JavaMail.zimbra@mozilla.com>

As to the issue with 'letter-spacing: 0px' allowing inter-character
spacing within justification, I'm fined with fantasai's proposed
wording allowing it.  I think if you allow justification to alter
inter-character spacing I don't think a '0' value can have a special
meaning, it has to be more than 'letter-spacing: -0.1px' and less than
'letter-spacing: 0.1px'.

However, I think I see a couple places where the current spec wording is ambiguous:

1. Spec should list explicitly which values of 'text-justify' can
   alter the letter spacing.  I think that's currently 'distribute'
   and 'auto', right?

2. The precise interaction between the 'letter-spacing' value and the
   spacing that results from using 'distribute' or 'auto' needs to be
   spelled out.

     p { width: 10em; text-align: justify; text-justify: distribute; }
     span { letter-spacing: 2em; }

     <p>aa<span>bb</span>cc</p>

   One way is to spread this spacing out evenly across the line:

     spacing = 10em - width("aabbcc") - 2em

   Then divide the spacing by the number of inter-character spaces (5)
   and add it to each inter-character space across the line.  The
   alternate is scaling the relative spacing until the total width is
   10em.  These two algorithms won't yield the same result so I think
   we need to indicate which is appropriate.

I don't think the 'fixed' value is really necessary at this level,
especially since it's only for use with the 'auto' value which has all
the language-sensitive justification magic.

Cheers,

John Daggett
Received on Wednesday, 14 August 2013 14:15:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC