These are my legal CSS Hacks for fixing web browser quirks or outright bugs. Please enjoy, I have been working on them for years. May it help you if you need them. Please read here first: [What are these CSS Hacks Anyway?] Then check my [Live CSS Hacks Test Page] and also [BrowserHacks.com] where I sent new hacks and test submissions for the site.
With my Chrome 22-28 hack, what if you needed just one of these due to a difference in CSS? (This does happen, hence the need for browser version hacks of specific numbers.) Mostly this is just for interest in puzzle solving, but not recent. The main purpose being the attempt to target specific browsers if possible.
From my Chrome and Safari hacks page:
/* Chrome 22-28 (and Opera 14-15) */ @media screen and(-webkit-min-device-pixel-ratio:0) { .selector {-chrome-:only(; property:value; );} }
Grabbing several from my Live CSS Hacks Test Page:
Do this one first to target Chrome 25 (The next couple will override 22-24):
/* Chrome 22-25 */ @media screen and(min--moz-device-pixel-ratio:0) { .selector { property:value; } }
Now the overrides:
/* Chrome 22-23 */ @media screen and(-webkit-min-device-pixel-ratio:0) { _::-moz-svg-foreign-content, _:scope, .selector { property:value; } }
/* Chrome 24 */ @media screen and (orientation) { ::webkit, .selector { property:value; } }
Leave a Reply