Collection of CSS hacks with use cases.
video::-webkit-media-controls-start-playback-button {
display: none !important;
}
select::-ms-expand {
display: none;
}
-webkit-tap-highlight-color: red
Sub-pixel font smoothing source
html {-webkit-font-smoothing: antialiased; }
@media only screen and (-webkit-min-device-pixel-ratio: 1.25), only screen and ( min-device-pixel-ratio: 1.25), only screen and ( min-resolution: 200dpi), only screen and ( min-resolution: 1.25dppx) {
-webkit-font-smoothing: subpixel-antialiased;
}
-webkit-overflow-scrolling: touch
Useful when using a plain text field to series of items.
white-space: pre-line;
Useful if you want text wrapped in a span to break to a new line at every word.
.parent {
width: 200px;
}
.child {
word-spacing: 200px; // for fluid layouts, you can use something like 9999999px
}
Not prefixed by autoprefixer as it's not standard.
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-user-drag: none;
user-drag: none;
@media screen and (-webkit-min-device-pixel-ratio: 0) {
select:focus, select:active, textarea:focus, textarea:active, input:focus, input:active {
font-size: 16px;
}
}