W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2017

Re: [csswg-drafts] [css-text-decor] Default color of text-shadow

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Wed, 22 Feb 2017 18:05:28 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-281751272-1487786727-sysbot+gh@w3.org>
Resolution from today's call is to simplify the model to tie the 
shadow to the "current text color".  We didn't resolve on precise 
text, instead deferring to this issue to hash it out.

I *believe* that just having it default to `currentcolor` works. For 
example, in

```html
<!DOCTYPE html>
<div><span class=one>foo</span><span class=two>bar</span></div>
<style>
div { text-shadow: 2px 2px 2px; }
.one { color: red; }
.two { color: black; }
</style>
```

Chrome, at least, shows the "foo" with a red shadow and the "bar" with
 a black shadow.  This is consistent with inheriting a `currentcolor` 
value.

And I think this handles selection properly too - the `currentcolor` 
inherits all the way down to the text nodes, which have their color 
changed by `::selection`, so the shadow will change color as well.

Does this sound good?

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/942#issuecomment-281751272 
using your GitHub account
Received on Wednesday, 22 February 2017 18:05:56 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:29 UTC