Skip to content

Instantly share code, notes, and snippets.

@MichaelArestad
Created March 28, 2012 01:55
Show Gist options
  • Save MichaelArestad/2222830 to your computer and use it in GitHub Desktop.
Save MichaelArestad/2222830 to your computer and use it in GitHub Desktop.
Selection Fail
/*
Selection Fail
*/
*::-moz-selection {
background: red;
color: white;
}
html {
background: #f06;
background: linear-gradient(45deg, #333, #555);
min-height: 100%;
}
*::selection {
background: red;
color: white;
}
h1, h2 {
font-size: 1.3em;
color: white;
text-align: center;
}
p {
padding: 20px;
background: white;
}
p:before {
content: "This isn't highlighting correctly. ";
font-weight: bold;
text-transform: uppercase;
}
<h1>Go ahead and highlight everything.</h1>
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Donec sed odio dui. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
{"view":"split-vertical","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment