Skip to content

Instantly share code, notes, and snippets.

@caraya
Created April 23, 2016 01:58
Show Gist options
  • Save caraya/29754c23543bde2d1c7b08d6b1eee2a5 to your computer and use it in GitHub Desktop.
Save caraya/29754c23543bde2d1c7b08d6b1eee2a5 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EQCSS Demo</title>
<style type="text/eqcss">
/* type="text/eqcss tells the script to parse the styles*/
@element ".minwidthpixels" and (min-width: 500px) {
.minwidthpixels {
background: rebeccapurple;
}
}
@element ".maxwidthpercents" and (max-width: 50%) {
.maxwidthpercents {
background: lightskyblue;
}
}
</style>
</head>
<body>
<article>
<div class="minwidthpixels">class="minwidthpixels"</div>
</article>
<article>
<div class="maxwidthpercents">class="maxwidthpercents"</div>
</article>
<!-- Scripts down here for performance reasons--></body>
<script
src="//cdnjs.cloudflare.com/ajax/libs/eqcss/1.1.0/EQCSS.min.js"></script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment