星雨笔录式真实页面 CSS 重构与验收 | CSS

本章覆盖:从现有页面识别 normal flow / Flex / Grid / Position;移除 magic number 和无必要 absolute;统一 box-sizing;建立 token;控制 specificity;优化 responsive breakpoint;long content / zoom / mobile 验收;Flex `min-width: 0` 等真实故障修复;stacking context 排查;image aspect-ratio / object-fit;prefers-reduced-motion;DevTools Styles / Computed / Layout / Performance;形成可复用的页面与组件样式规范。

本章知识点

  • 从现有页面识别 normal flow / Flex / Grid / Position
  • 移除 magic number 和无必要 absolute
  • 统一 box-sizing
  • 建立 token
  • 控制 specificity
  • 优化 responsive breakpoint
  • long content / zoom / mobile 验收
  • Flex min-width: 0 等真实故障修复
  • stacking context 排查
  • image aspect-ratio / object-fit
  • prefers-reduced-motion
  • DevTools Styles / Computed / Layout / Performance
  • 形成可复用的页面与组件样式规范