Skip to content

Instantly share code, notes, and snippets.

View jslegers's full-sized avatar

John Slegers jslegers

View GitHub Profile
@jslegers
jslegers / gist:6562976
Created September 14, 2013 15:34
Hiding mobile specific content on IE6-8
/* Add the desktop-hidden class to any HTML tag that contains mobile specific content */
.desktop-hidden {
*display:none !important; /* IE6-7 */
}
@media \0 screen {
.desktop-hidden {
display:none !important; /* IE8 only */
@jslegers
jslegers / style.scss
Created July 26, 2013 13:24
A CodePen by Hugo Giraudel. Sass mixin for scrollbar styling - Because I can't ever remember the right syntax for scrollbars styling in WebKit, here is a little Sass mixin to do it for you.
@import "compass";
/**
* Mixin scrollbar
*/
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) {
::-webkit-scrollbar {
width: $size;
height: $size;
}
@jslegers
jslegers / index.html
Last active January 16, 2020 21:38
Simple 2 player version of the "connect four" game. All code is MIT licenced.
<body>
<span id="a">red</span>
<span id="b">yellow</span>
<span id="n">Are you sure you want to start a new game?</span>
<span id="w">The %s player won.
Do you want to play a new game?</span>
<div id="game">It's the <span id="c"></span>&nbsp;player's move.
<table id="gameboard">
<tr>
<td id="c-1-1"></td>
/*
Scoped Media Query Mixins - an element query workaround.
@mixin respond-to-all : generates @media () {}
@mixin respond-to-screen : generates @media screen and () {}
@mixin respond-to-screen-only : generates @media screen only and () {}
Accepts the following input :
@jslegers
jslegers / _clearfix.scss
Last active October 30, 2018 12:59
Clearfix code without duplication
%display-block-hacked {
display: block;
*zoom: 1;
}
%clear-both {
clear : both;
}
%blank-as-table {