JSはオミット、HTMLに移行
アイコン一覧のサイズ変更をJavaScriptを使ったWeb Componentから、サイズごとに別ページを用意するHTML主体のアプローチに置き換えた事例。JSを削除したことでCSSビュートランジションが無料で手に入り、モバイルでも快適に動作。クライアント側の重複コードを排除し、メンテナンス負荷も軽減できた。
アイコン一覧のサイズ変更をJavaScriptを使ったWeb Componentから、サイズごとに別ページを用意するHTML主体のアプローチに置き換えた事例。JSを削除したことでCSSビュートランジションが無料で手に入り、モバイルでも快適に動作。クライアント側の重複コードを排除し、メンテナンス負荷も軽減できた。
The article discusses a shift in web development towards using simple HTML for interactivity instead of JavaScript, highlighting how features like the `<details>` element, form-based navigation, and `popover` attributes can reduce complexity and improve performance.
The article explores lesser-known features and semantic nuances of HTML list elements (ul, ol, dl), highlighting attributes like reversed, start, and value for ordered lists, and explaining proper use cases for description lists. It emphasizes writing accessible, meaningful markup beyond basic list usage.
The article explains how to display fractions in HTML using the `<sup>` (superscript) and `<sub>` (subscript) tags, such as `<sup>1</sup>⁄<sub>2</sub>` for 1/2, and notes that CSS styling can improve the appearance of these inline fractions.