Skip to content

Instantly share code, notes, and snippets.

View terkel's full-sized avatar

Takeru Suzuki terkel

View GitHub Profile
@terkel
terkel / hidden.css
Last active December 23, 2015 15:19
/*
* http://adaptivethemes.com/using-css-clip-as-an-accessible-method-of-hiding-content
* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
* http://developer.yahoo.com/blogs/ydn/clip-hidden-content-better-accessibility-53456.html
* https://github.com/h5bp/html5-boilerplate/issues/194
*/
/* Hide from both screenreaders and browsers */
.hidden {
display: none !important;
// ----
// Sass (v3.2.10)
// Compass (v0.13.alpha.4)
// ----
// http://blog.livedoor.jp/dankogai/archives/51518565.html
// https://github.com/terkel/mathsass
$LN2: 0.6931471805599453;
$SQRT2: 1.4142135623730951;
/*!
* Copyright (c) 2013 Takeru Suzuki - http://terkel.jp/
* Licensed under the MIT license - http://opensource.org/licenses/MIT
*/
function getWidthFromHeightAndAspectRatio (height, aspectRatio) {
return height * aspectRatio;
}
function getHeightFromWidthAndAspectRatio (width, aspectRatio) {
return width / aspectRatio;
}
@terkel
terkel / SassMeister-input.scss
Created June 30, 2013 03:29
Generated by SassMeister.com, the Sass playground.
// ---
// Sass (v3.2.9)
// ---
@mixin pos ($top: 0, $right: 0, $bottom: 0, $left: 0) {
top: $top;
right: $right;
bottom: $bottom;
left: $left;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="initial-scale=1" />
<meta name="description" content="" />
<title>Untitled</title>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="initial-scale=1" />
<meta name="description" content="" />
<title>Untitled</title>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1">
<meta name="description" content="">
<title>Untitled</title>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1">
<meta name="description" content="">
<title>Untitled</title>