Skip to content

Instantly share code, notes, and snippets.

@RyoSugimoto
RyoSugimoto / clearfixes.css
Last active December 19, 2015 01:19
様々なClearfix。
/* Clearfixes */
/** --
* Original
*/
.original:after{
content: ".";
display: block;
height: 0;
@RyoSugimoto
RyoSugimoto / _mixins.scss
Last active December 19, 2015 22:19
Sassのミックスイン集。
// ==========
// Mixins
// ==========
// Vendor prefix
// ベンダープリフィックス付きのプロパティを自動生成します。
// @param $prop {property name} プロパティ名
// @param $value {?} 値
@mixin vendor-prefix ($prop, $value) {
@RyoSugimoto
RyoSugimoto / _config.sass
Last active December 19, 2015 22:19
Sassの設定用ファイルの記述例。
// ==========
// Config
// ==========
// Browser support
$support-ie6: false;
$support-ie7: false;
$support-ie8: true;
$support-ie9: true;
@RyoSugimoto
RyoSugimoto / sass_watch.bat
Last active December 22, 2015 13:49
Sass --watch用のバッチファイル記述例。
cd /d %~dp0
chcp 65001
set LANG=ja_JP.utf8
sass --style expanded --watch _sass:css --cache-location _sass/_cache/.sass-cache
@RyoSugimoto
RyoSugimoto / photoshop_shortcuts.md
Last active December 24, 2015 19:49
Photoshopのショートカットキー

Photoshopのショートカットキー

基本

Key Action
@RyoSugimoto
RyoSugimoto / gist:7066511
Created October 20, 2013 08:33
pre内で文字列を折り返すCSS。
pre {
white-space: pre-wrap;
word-wrap: break-word;
overflow: auto;
}
@RyoSugimoto
RyoSugimoto / delete-gutter.css
Last active December 28, 2015 05:08
インラインブロック同士の隙間を消す。
.parent {
font-size: 0;
letter-spacing: -1px;
word-spacing: -1px;
/*
letter-spacingとword-spacingはそれぞれ
「-1」にすると、環境によって崩れる場合があるので、
その場合は「0」にする。
それでもうまく行かなければ、JavaScriptで改行を削除するか、
あらかじめHTMLから改行を消しておく。
@RyoSugimoto
RyoSugimoto / get_text_node.js
Created February 10, 2014 05:26
jQueryを使ってテキストノードのみを抽出する。
// テキストノードのみを抽出して返す
function getTextNode ($target, str) {
var nodes = $target
.contents()
.filter(function () {
return this.nodeType === 3 // テキストノードか否か
&& /\S/.test(this.data) // 空白か否か
&& $.inArray($(this).parent(), $target) // 直下か否か
&& (typeof str === 'undefined' || str === this.nodeValue); // 文字列の指定がある場合
});
@RyoSugimoto
RyoSugimoto / japanese_rules.md
Last active May 24, 2022 01:52
日本語文書のルールのまとめ。

日本語品質

漢字で表記するもの

  • 結構
  • 出来・出来事
  • 召し上がる
  • 勿体ない(もったいない)
@RyoSugimoto
RyoSugimoto / 0_reuse_code.js
Created March 20, 2014 09:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console