Skip to content

Instantly share code, notes, and snippets.

@afj176
Last active January 5, 2016 11:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save afj176/6357322 to your computer and use it in GitHub Desktop.
Save afj176/6357322 to your computer and use it in GitHub Desktop.
Working out how to target nexus 7(2013) over nexus 7(2012)

Targeting Nexus 7 2012 & 2013

Media Query Differences

Demo here


###Nexus 7 2012

1280 x 800 pixels (216 ppi)

portrait

@media screen
  	and (max-device-width: 601px)
  	and (orientation : portrait) 
	and (-webkit-min-device-pixel-ratio: 1.331)
	and (-webkit-max-device-pixel-ratio: 1.332){
		
		.device-name:after{
	  		content:" \00a9  2012";
		}
			
}

landscape

@media screen 
	and (min-device-width: 602px) 
	and (orientation : landscape) 
	and (-webkit-min-device-pixel-ratio: 1.331) 
	and (-webkit-max-device-pixel-ratio: 1.332){
		
		.device-name:after{
	  		content:" \00a9  2012";
		}
		
}

###Nexus 7 2013

1920 x 1200 pixels (323 ppi)

portrait

@media screen 
	and (max-device-width: 601px)
	and (orientation : portrait) 
	and (-webkit-min-device-pixel-ratio: 2)
	and (device-aspect-ratio: 25/38){
		
		.device-name:after{
	  		content:" \00a9  2013";
		}
			
}

landscape

@media screen
	and (min-device-width: 602px)
	and (orientation : landscape) 
	and (-webkit-min-device-pixel-ratio: 2)
	and (device-aspect-ratio: 40/23){
		
		.device-name:after{
	  		content:" \00a9  2013";
		}
			
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment