Jump to content

Changing selected text's style


10 weber

Recommended Posts

Is there a way to access the style of selected content without the window.getSelection() JS function?
::-moz-selection { color: red; }::selection { color: red; }And any other prefixes for browsers that support it. They have to be separate rules because CSS parsers discard anything they don't understand (and different browsers obviously won't understand each other's prefixes). This includes groupings of selectors - if one selector is invalid the entire grouping is broken.I know for sure Firefox and Webkit support this so far - webkit doesn't have a prefix for this.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...