Skip to content

Add a clipboard media type #648

@SebastianZ

Description

@SebastianZ

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:

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>):

@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.

Sebastian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions