Last active
February 13, 2016 10:19
-
-
Save aaronvanston/6af0a8c886499662bae7 to your computer and use it in GitHub Desktop.
Browser statistics using only CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ORIENTATION */ | |
@media (orientation: landscape) { | |
.stat__orientation:after { | |
content: "Landscape" | |
} | |
} | |
@media (orientation: portrait) { | |
.stat__orientation:after { | |
content: "Portrait"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WIDTH */ | |
$width: 2000; | |
@for $i from 500 through $width { | |
@media (min-width: #{$i}px) { | |
.stat__size-width:after { | |
content: "#{$i}px"; | |
} | |
} | |
} | |
@media (min-width: 2001px) { | |
.stat__size-width:after { | |
content: "Greater than 2000px"; | |
} | |
} | |
@media (max-width: 499px) { | |
.stat__size-width:after { | |
content: "Less than 500px"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<p class="stat__size-width">Size (Width): </p> | |
<p class="stat__size-height">Size (Height): </p> | |
<p class="stat__orientation">Orientation: </p> | |
<p class="stat__medium">Medium: </p> | |
<p class="stat__colour">Colour: </p> | |
<p class="stat__resolution">Resolution: </p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment