Skip to content

CSSの意図的な上書きに@layerの導入方針を設計する #1097

Description

@irof

#1096 のサブタスク。

目的

common.css に残る22件の stylelint-disable no-descending-specificity のうち、同一ページ内で意図的にコンテキスト別の上書きをしている箇所(.sidebar--collapsed での非表示化、.tab-content-section 配下のテーマ切り替え、.glossary 内でのバッジ縮小表示など)を、詳細度に頼らずカスケードレイヤー(@layer)で優先順位を明示する設計に移行したい。

検討事項

  • レイヤーの分割粒度(例: base, component, override の3層で足りるか、ページ固有の上書きにも専用レイヤーが要るか)
  • 既存の !important.deprecated など)との整合性(レイヤーより !important は常に優先されるため設計上の扱いを決める)
  • @layer 未対応の古いブラウザへの配慮要否(JIGの利用想定ブラウザを確認する)
  • stylelintの no-descending-specificity がレイヤーをどう扱うか(レイヤーが異なれば詳細度比較自体が無意味になるため、ルール側の挙動を確認する)

完了条件

  • レイヤー構成案と、移行対象22件の割り当てをドキュメント化する
  • 次のサブissueで実装できる状態にする

Created by Claude Code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions