Cool CSS Snippets & Concise Fixes

Cool CSS snippets and concise fixes to common problems. Everything works will all browsers unless otherwise stated. More to come.
Wrap a long link
Prevent a link from breaking out of its parent element.
CSS
Detect a Retina display with a media query
You can detect a Retina display with the following media query.
CSS
Works with IE11, Microsoft Edge 17+, Chrome 49+, Firefox 59+, Safari 11.1+, iOS Safari 10.3+, Chrome for Android 67+ and Samsung Internet 4+.
Firefox dotted focus ring fix
The -moz-focusring pseudo-class values removes the dotted focus ring in select elements and similar in Firefox.
CSS
Brick an element
You can effectively disable an element by giving the pointer-events property a value of none. Click events are no longer triggered.
CSS
Works with IE11, Microsoft Edge 17+, Chrome 49+, Firefox 61+, Safari 11.1+, iOS Safari 10.3+, Chrome for Android 67+ and Samsung Internet 4+.
Shorten text with an ellipsis
You can shorten overlong text in an element with an ellipsis.
CSS
Easy float clear
This clears floats 99.9% of the time, and you'll probably need nothing more.
CSS
HTML
Vertically align a single line of text
Useful for vertical menu bars and the like.
CSS
Good Helvetica
Probably the best Helvetica you can get.
CSS
A lighter Helvetica
Still good, but lighter.
CSS
Make an empty element obey width
Sometimes you need an empty element to respect its width property. This will do it.
CSS
Works with IE11, Microsoft Edge 17+, Chrome 49+, Firefox 61+, Safari 11.1+, iOS Safari 10.3+, Chrome for Android 67+ and Samsung Internet 4+.
Zebra stripes
Selects every second child of its parent. This method can be used on lists or on tables using the tr element.
CSS
Making a block of content a link
You should be careful with the color property and the hover pseudo-class. Also, the HTML 5 spec forbids interactive content within anchor tags.
CSS
HTML
Eased color change on hover
A nicer hover color change.
CSS
Works with IE11, Microsoft Edge 17+, Chrome 49+, Firefox 61+, Safari 11.1+, iOS Safari 10.3+, Chrome for Android 67+ and Samsung Internet 4+.