css-refactoring-patterns
Ctrlk
  • Introduction
  • Patterns
    • Extract inline style
    • Extract key selector
    • Extract to class
    • Generalise id selector
    • Inline block to flex
    • Merge duplicate selector
    • Move up hierarchy
    • Reduce DOM dependency
    • Reduce specificity
    • Remove !important declaration
    • Remove qualified selector
    • Reuse color
  • Dead CSS
  • Refactoring in the wild
Powered by GitBook
On this page

Patterns

Extract inline styleExtract key selectorExtract to classGeneralise id selectorInline block to flexMerge duplicate selectorMove up hierarchyReduce DOM dependencyReduce specificityRemove !important declarationRemove qualified selectorReuse color
PreviousIntroductionNextExtract inline style

Last updated 5 years ago

Was this helpful?

Was this helpful?