Skip to content

Instantly share code, notes, and snippets.

View yomotsu's full-sized avatar

Akihiro Oyamada yomotsu

View GitHub Profile
$basefontSize : 12;
@mixin font-size_XXL{font-size:18 / $basefontSize * 100%;}
@mixin font-size_XL{font-size:16 / $basefontSize * 100%;}
@mixin font-size_L{font-size:14 / $basefontSize * 100%;}
@mixin font-size_S{font-size:10 / $basefontSize * 100%;}
@mixin opacity($opacity){
filter:alpha(opacity=$opacity*100);
opacity:$opacity;
}
@yomotsu
yomotsu / _mixin_linear-gradient.scss
Created May 14, 2011 07:22
sass @Minxin linear-gradient() including SVG code for IE9
@mixin linear-gradient($angle, $color1, $offset1, $color2 ,$offset2:100, $color3:null, $offset3:100, $color4:null, $offset4:100, $color5:null, $offset5:100){
$angle_webkit:'left top, left bottom';
$angle_svg:'%20x2%3d%220%25%22%20y2%3d%22100%25%22';
$color-stop1_css:'#'#{$color1}' '#{$offset1}'%';
$color-stop2_css:',#'#{$color2}' '#{$offset2}'%';
$color-stop3_css:'';
$color-stop4_css:'';
$color-stop5_css:'';
$color-stop1_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color1}'%22%20offset%3d%22'#{$offset1}'%25%22%2f%3e';
$color-stop2_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color2}'%22%20offset%3d%22'#{$offset2}'%25%22%2f%3e';
@yomotsu
yomotsu / _mixin_linear-gradient.scss
Created May 24, 2011 07:38 — forked from hiloki/_mixin_linear-gradient.scss
sass @Minxin linear-gradient() including SVG code for IE9
@mixin linear-gradient($angle, $color1, $offset1, $color2 ,$offset2:100, $color3:null, $offset3:100, $color4:null, $offset4:100, $color5:null, $offset5:100){
$angle_webkit:'';
$angle_svg:'';
$color-stop1_css:'#'#{$color1}' '#{$offset1}'%';
$color-stop2_css:',#'#{$color2}' '#{$offset2}'%';
$color-stop3_css:'';
$color-stop4_css:'';
$color-stop5_css:'';
$color-stop1_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color1}'%22%20offset%3d%22'#{$offset1}'%25%22%2f%3e';
$color-stop2_svg:'%3cstop%20style%3d%22stop%2dcolor%3a%23'#{$color2}'%22%20offset%3d%22'#{$offset2}'%25%22%2f%3e';
html,button,input,select,textarea {font-family:'\30D2\30E9\30AE\30CE\89D2\30B4\20\50\72\6F\20\57\33','Hiragino Kaku Gothic Pro','\30E1\30A4\30EA\30AA',Meiryo,'\FF2D\FF33\20\FF30\30B4\30B7\30C3\30AF',sans-serif;}
font-family: 'Hiragino Kaku Gothic Pro',Meiryo,'MS PGothic',sans-serif;
@yomotsu
yomotsu / gist:1505068
Created December 21, 2011 07:25
text-align
// text-align
.ex-alignLeft {text-align:left; }
.ex-alignRight {text-align:right; }
.ex-alignCenter {text-align:center; }
.ex-alignTop {vertical-align:top; }
.ex-alignMiddle {vertical-align:middle; }
.ex-alignBottom {vertical-align:bottom; }
.ex-alignJustify {
text-align: justify;
@yomotsu
yomotsu / gist:1825024
Created February 14, 2012 09:13
端末 振り分け, 操作ボタン付き
;(function($){
var _isMobile = (function() {
var useragents = [
'iPhone', // Apple iPhone
'iPod', // Apple iPod touch
'iPad', // Apple iPad
'Android', // Android
'Windows Phone OS', // WindowsPhone
'BlackBerry', // BlackBerry
@mixin linkOldIE{
*background:url(inc-dvdirectLineupItem/ie6.png);
img{
display:block;
*position:relative;
*z-index:-1;
}
}
@yomotsu
yomotsu / gist:2235766
Created March 29, 2012 10:42
polyfill for input@placeholder
(function($){
$(function(){
if(!Modernizr.input.placeholder){
var $i = $('input[placeholder]');
$i.each(function(){
var $that = $(this);
var text = $that.attr('placeholder');
$that.css({color:'#aaa'});
$that.val(text);
$that.bind('focus', function(){
@yomotsu
yomotsu / direct embeding a SWF
Created May 22, 2012 10:37
flash 直接埋め込み
<object type="application/x-shockwave-flash" data="http://youtube.googleapis.com/v/OFSO8IHnFL8" width="640" height="360">
<param name="movie" value="http://youtube.googleapis.com/v/OFSO8IHnFL8">
<param name="wmode" value="transparent">
</object>