レスポンシブ実装の判断基準を明確にし、不要なブレイクポイントとコード量を最小化する。 CSS はブラウザへの「提案」であり、厳密な命令ではない。ブラウザに委ねられる仕事は委ねる。
レスポンシブ対応は以下の優先順序で検討する。上位で解決できるなら下位は使わない。
| 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 |