Skip to content

Instantly share code, notes, and snippets.

View msikma's full-sized avatar
๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ

Michiel Sikma msikma

๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ
View GitHub Profile
@msikma
msikma / aural-only.scss
Created January 12, 2015 22:07
CSS class to hide text for everything except screen readers
// Class to hide something except on aural browsers/screen readers.
// Just setting display: none does not work, since then it hides the item
// on aural browsers too.
// This set of attributes appear to have good results, but feedback
// from users of screen readers is always appreciated.
.aural-only {
height: 1px;
margin: -1px;
clip: rect(0px, 0px, 0px, 0px);
border: none;
@msikma
msikma / list_all_countries_eu.js
Last active July 10, 2021 10:24
List of all countries โ€“ separated, inside European Union and outside EU
/**
* List of countries, with country code (ISO 3166-1), separated by whether
* they're inside or outside the EU. This list has been updated as of
* 2014-12-04, per the list of deleted countries
* at <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>.
*/
var listAllCountries = {
'insideEU': {
'AT': 'Austria',
@msikma
msikma / img-load-cb.js
Created November 3, 2014 13:27
jQuery Image load callback (IE6 compatible)
// requires jQuery 1.x
// image load callback that is compatible with IE6
var $img = $('.some-selector img');
var isIE6 = jQuery.browser.msie && parseInt(jQuery.browser.version) == 6;
$img.one("load", function()
{
/*
image load event code goes here
@msikma
msikma / gmail-colors.txt
Created November 3, 2014 13:23
Old Gmail label color swatches
light blue green #DEF9F2
light blue 2 #E0ECFF
light blue 3 #DFE2FF
lavender #E0D5F9
light pink #FDE9F4
light pink 2 #FFE3E3
gray blue #5A6986
bright blue #206CFF
blue #0000CC
purple #5229A3
@msikma
msikma / select-php-var.php
Created November 3, 2014 13:20
Select PHP variable
<?php
// select php variable (more or less)
$sel_php_var = '\$([^\s,.;=*+\-&~%-+|)]*)';
@msikma
msikma / set-states.scss
Last active August 29, 2015 14:08
Set container pseudo-selector states
@mixin set-states($states) {
$selector: ();
@for $i from 1 through length($states) {
$selector: append($selector, unquote("&:#{nth($states, $i)}"), comma);
}
#{$selector} {
@content;
}
}