Skip to content

Instantly share code, notes, and snippets.

@bkardell
Last active December 16, 2015 08:29
Show Gist options
  • Select an option

  • Save bkardell/5406101 to your computer and use it in GitHub Desktop.

Select an option

Save bkardell/5406101 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title>Min-width/Max-with prollyfill in JS</title>
<!-- link up the latest hitchjs -->
<script src="http://hitchjs.com/dist/hitch-0.6.3.min.js"></script>
<!-- mark a style or link tag with the data-hitch-interpret flag -->
<style data-hitch-interpret>
/* require his prollyfill (you could also get it from rawgithub mentioned in prose below) ... */
@-hitch-requires http://www.hitchjs.com/use/fremycompany.minwidth/1;
/* start using it... */
#inner:-js-min-width(600px) {
background-color: green;
}
#inner:-js-max-width(600px) {
background-color: yellow;
}
</style>
....
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment