View new-clearfix.css
/* new clearfix */ | |
/* http://perishablepress.com/press/2009/12/06/new-clearfix-hack/ */ | |
.clearfix:after { | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; | |
height: 0; | |
} |
View gist:255328
### file read ### | |
open my $fh, '<', $filename || die $@; | |
while (my $line = <$fh>) { | |
print $line; | |
} | |
close $fh; | |
### file write ### | |
use utf8; |
View gist:255912
use Coro; | |
### To create a thread, use the async function | |
async { | |
print "async 1\n"; | |
cede; | |
print "async 2\n"; | |
}; | |
print "main 1\n"; |
View gist:257725
### ヒアドキュメント(変数展開なし) ### | |
my $text1 = <<'EOS'; | |
aaa | |
bbb | |
ccc | |
EOS | |
### ヒアドキュメント(変数展開あり) ### | |
my $eee = 'eee; | |
my $text2 = <<"EOS" |
View yui-fonts.scss
/* YUI Fonts.css | |
Copyright (c) 2010, Yahoo! Inc. All rights reserved. | |
Code licensed under the BSD License: | |
http://developer.yahoo.com/yui/license.html | |
version: 3.3.0 | |
build: 3167 | |
*/ | |
body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;} | |
@mixin font_10 { font-size: 77%; } |
View 1kb_grid.scss
/* | |
1kb_grid.scss | |
This SCSS is based on "The 1Kb CSS Grid". | |
Learn more ~ http://www.1kbgrid.com/ | |
*/ | |
/* Grid Settings | |
---------------------------*/ | |
$columns: 12; // Number of columns (9, 10, 12, 14 or 16) |
View 1kb_grid_extended.scss
/* | |
1kb_grid_extended.scss | |
This SCSS is based on "The 1Kb CSS Grid". | |
Learn more ~ http://www.1kbgrid.com/ | |
*/ | |
/* Grid Settings | |
---------------------------*/ | |
$columns: 12; // Number of columns (9, 10, 12, 14 or 16) |
View adjust-font-size.scss
@function -yui-font-size($px) { | |
@if $px == 10 { @return 77%; } | |
@else if $px == 11 { @return 85%; } | |
@else if $px == 12 { @return 93%; } | |
@else if $px == 13 { @return 100%; } | |
@else if $px == 14 { @return 108%; } | |
@else if $px == 15 { @return 116%; } | |
@else if $px == 16 { @return 123.1%; } | |
@else if $px == 17 { @return 131%; } | |
@else if $px == 18 { @return 138.5%; } |
View 960gs.scss
/*----------------------------------------------------- | |
960 Grid System ~ Core CSS. | |
Learn more ~ http://960.gs/ | |
Licensed under GPL and MIT. | |
-------------------------------------------------------*/ | |
/* Grid Settings | |
---------------------------*/ | |
// 12-column grid |
View linear-gradient.scss
$css3-ie-support: 0 !default; | |
@mixin linear-gradient($topColor, $bottomColor) { | |
background-image: -moz-linear-gradient(top, $topColor, $bottomColor); | |
background-image: -webkit-gradient(linear, left top, left bottom, from($topColor), to($bottomColor)); | |
// If you set the output style as "compressed", it doesn't work well... | |
@if $css3-ie-support == 1 { | |
$ieTopColor: rgb(red($topColor), green($topColor), blue($topColor)); | |
$ieBottomColor: rgb(red($bottomColor), green($bottomColor), blue($bottomColor)); |
OlderNewer