W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2016

[csswg-drafts] Add a clipboard media type

From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
Date: Wed, 26 Oct 2016 08:23:21 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-185326920-1477470200-sysbot+gh@w3.org>
SebastianZ has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== Add a clipboard media type ==
It should be possible to style web contents differently when they are 
copied to the clipboard.

This would allow modifications like e.g. resizing or hiding images 
when copied, or removing some styling which should only be shown 
within the browser, or display some copyright information on copied 
text.

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

#copyrightInfo {
  display: none;
}

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

  #copyrightInfo {
    display: block;
  }
}
```

To be able to style different clipboard formats individually, 
`clipboard` may be changed to a function like 
`clipboard(<mime-type>)`:

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

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

*This idea rose in the [issue about the copy/paste behavior with 
`text-transform`](https://github.com/w3c/csswg-drafts/issues/627#issuecomment-256123638).*

Sebastian

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/648 using your GitHub 
account
Received on Wednesday, 26 October 2016 08:23:33 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:04 UTC