A Pen by Yoshihide Jimbo on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### file read ### | |
open my $fh, '<', $filename || die $@; | |
while (my $line = <$fh>) { | |
print $line; | |
} | |
close $fh; | |
### file write ### | |
use utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Coro; | |
### To create a thread, use the async function | |
async { | |
print "async 1\n"; | |
cede; | |
print "async 2\n"; | |
}; | |
print "main 1\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ヒアドキュメント(変数展開なし) ### | |
my $text1 = <<'EOS'; | |
aaa | |
bbb | |
ccc | |
EOS | |
### ヒアドキュメント(変数展開あり) ### | |
my $eee = 'eee; | |
my $text2 = <<"EOS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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%; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('*').each(function() { | |
var position = $(this).css('position'), | |
zIndex = $(this).css('z-index'); | |
if (position != 'static' && zIndex != 'auto') { | |
console.log(position, zIndex, $(this)); | |
} else if (position != 'static') { | |
console.log(position, '0 in IE', $(this)); | |
} | |
}); |
OlderNewer