css-refactoring-patterns
  • 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
    • Using the CLI
    • Using Vim
  • Refactoring in the wild
    • Replacing multiple ids with one class
    • Removing a selector
Powered by GitBook
On this page

Was this helpful?

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?