Skip to content

Instantly share code, notes, and snippets.

View ver-1000000's full-sized avatar
😍
Love you!

AKAI - Shota Sasaki ver-1000000

😍
Love you!
View GitHub Profile
@sigmike
sigmike / rmagick_arch.bash
Created January 9, 2018 15:52
Install rmagick with imagemagick 6 on arch
sudo pacman -S libmagick6
PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig gem install rmagick
# or with bundler:
PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig bundle install
const optimalFontSize = (word, r, fontFamily, fontWeight) => {
const text = document.createElementNS('http://www.w3.org/2000/svg', 'text')
text.textContent = word
text.setAttributeNS(null, 'font-family', fontFamily)
text.setAttributeNS(null, 'font-weight', fontWeight)
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
svg.appendChild(text)
document.body.appendChild(svg)
let ok = 0
let ng = 100
@tak-dcxi
tak-dcxi / css-responsive.md
Last active April 3, 2026 16:51
CSS Responsive Rules

CSS Responsive Rules

目的

レスポンシブ実装の判断基準を明確にし、不要なブレイクポイントとコード量を最小化する。 CSS はブラウザへの「提案」であり、厳密な命令ではない。ブラウザに委ねられる仕事は委ねる。

基本方針: エスカレーション順序

レスポンシブ対応は以下の優先順序で検討する。上位で解決できるなら下位は使わない。