Skip to content

Instantly share code, notes, and snippets.

@ideefixe
ideefixe / target_firefox.css
Created January 22, 2013 21:16
Browser Media Queries
@-moz-document url-prefix() {
// css goes here
}
@ideefixe
ideefixe / Conditional CSS
Created January 22, 2013 21:08
Conditional CSS
[if {!} browser]
[if {!} browser version]
[if {!} condition browser version]
! - indicates negation of the statement (i.e. NOT) - optional
browser - states which browser the statement targets
'IE' - Internet Explorer
'Gecko' - Gecko based browsers (Firefox, Camino etc)
'Webkit' - Webkit based browsers (Safari, Chrome, Shiira etc)
@ideefixe
ideefixe / iphone_queries.css
Last active December 11, 2015 12:08
iPhone Media Queries
<!-- iPhone 2G, 3G, 3GS Portrait -->
@media only screen and (device-width: 320px) and (orientation: portrait) and not (-webkit-min-device-pixel-ratio: 2) {
/* CSS3 Rules for iPhone in Portrait Orientation */
}
<!-- iPhone 2G, 3G, 3GS Landscape -->
@media only screen and (device-width: 480px) and (orientation: landscape) and not (-webkit-min-device-pixel-ratio: 2) {
/* CSS3 Rules for iPhone in Landscape Orientation */
}
@ideefixe
ideefixe / jquery_media_query.js
Last active December 11, 2015 10:38
Jquery media query
$(window).resize(function() {
var width = $(window).width();
if (width < 960) {
// Do Something
}
else {
//Do Something Else
}
});