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

Re: [css-text] Enhanced underline options

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 16 Dec 2014 11:59:20 -0800
Message-ID: <CAAWBYDAhF7BJBr6iiEe-Sf-S0772gi2a1ZR2Z2xuf5LJ46bAbA@mail.gmail.com>
To: Bobby Mozumder <mozumder@futureclaw.com>
Cc: www-style list <www-style@w3.org>
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

~TJ
Received on Tuesday, 16 December 2014 20:00:06 UTC

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