Re: [csswg-drafts] [css-text] behavior of copy/paste with text-transform

I just saw that my previous example was wrong. It should actually have
 been:

```css
h2 {
  text-transform: uppercase;
}

@media clipboard {
  h2 {
    text-transform: none;
  }
}
```

> Supposedly that would only apply to plain-text clipboard, and the 
rich text version of the clipboard would be unaffected

I thought it would affect both, so the `text-transform` value would be
 part of the HTML data.
If wished, my proposal could even be extended to allow to distinguish 
between plain text and HTML data by supporting MIME types:

```css
@media clipboard("text/plain") {
  h2 {
    text-transform: none;
  }
}

@media clipboard("text/html") {
  h2 {
    text-transform: none;
  }
}
```

While this approach allows the web author to control the styling of 
the clipboard data, UAs still need to provide proper defaults. And 
that's still the hard part.
So, Christophs argument that copied plain text should not be 
influenced by CSS  is still valid.

Because a 'clipboard' media type is independent from this discussion, 
I've filed issue #648 to discuss it separately.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/627#issuecomment-256281803 
using your GitHub account

Received on Wednesday, 26 October 2016 08:26:33 UTC