W3C home > Mailing lists > Public > www-style@w3.org > December 2014

Re: [css-text] Enhanced underline options

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Wed, 17 Dec 2014 08:55:56 +1100
Message-ID: <CAMdq699X=ZUyaGeRVHdgkg3+D-vJxkO-x7RgC0RV5KH5yFe88A@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Bobby Mozumder <mozumder@futureclaw.com>, www-style list <www-style@w3.org>
On Wed, Dec 17, 2014 at 6:59 AM, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:
>
> On Tue, Dec 16, 2014 at 11:29 AM, Bobby Mozumder
> <mozumder@futureclaw.com> wrote:
> > Hi everyone,
> >
> > Please consider addition further options for text-decoration: underline
> >
> > We do need the ability to adjust the spacing, thickness, color, and
> style of
> > the underline.  This would be for enhanced stylistic effects.  InDesign
> has
> > the ability to style these things, as well as the spacing from the
> underline
> > to the text baseline.
> >
> > I also noticed that Firefox and Webkit doesn’t have different underline
> > spacing when font scales in size, which I believe is because there’s not
> a
> > clear definition of underline style in CSS.
> >
> > A possible long-form syntax:
> >
> > .underline-text {
> >   text-decoration: underline;
> >   color: black;
> >   underline-width: 2px;
> >   underline-color: blue;
> >   underline-style: dotted;
> >   underline-spacing-width: 4px;
> >   underline-spacing-color: rgba(1, 1, 0, .65);
> > }
> >
> > inDesign doesn’t have an underline-spacing-style, so I didn’t include
> that
> > here, but it could be an option.
> >
> > Underlines should have a gap behind descenders (which might need it’s own
> > css-definition), and they are supposed to appear behind the text.  You
> could
> > also do this with overlies as well.
> >
> > InDesign does have line-through/strikethrough options, which is like a
> > second underline with negative spacing that appears in front of the text,
> > and that could take the following syntax:
> >
> > .strikethrough-text {
> >   text-decoration: line-through;
> >   color: black;
> >   linethrough-width: 1px;
> >   linethrough-color: red;
> >   linethrough-style: dotted;
> >   linethrough-spacing-width: -.8em;
> >   linethrough-spacing-color: transparent;
> > }
> >
> > Please consider this.  Thank you!
>
> Already considered and put in spec quite a while ago ^_^
> http://dev.w3.org/csswg/css-text-decor/#line-decoration
>

I don't think we have equivalence of underline-spacing-{width,color} in the
current spec. There are request from authors for this kind of thing, but
I'm not sure whether it is something good to add to the spec.

- Xidorn
Received on Tuesday, 16 December 2014 21:57:05 UTC

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