Skip to content

All-intended-features release as 'postcss-extend'

Compare
Choose a tag to compare
@travco travco released this 09 Jul 15:50
· 35 commits to master since this release

Only known ongoing issues of note are some odd results (not even crashes, just results) when it attempts to correctly process CSS that has infinite @extend loops when @media statements are involved.

So, don't expect infinite loops to go over smoothly?
Yes, you shouldn't be using them anyway.

Features added since postcss-simple-extend (aka: v0.3.x and earlier) :

  • Works with silent '%' selectors
  • Works with existing (real) rules at root
  • Strict behavior of standard placeholder, and relaxed behavior of % (silent) classes
  • Elimination of duplicate selectors on extended rules
  • Removal of otherwise empty code blocks (from only-extension)
  • Acts recursively (both directions thanks to 'living log' behavior, and selective-recursion)
  • Targets sub classes and extends them with pseudo version of the extended
  • Acts recursively on sub classes
  • Finds it's exisiting sub classes (shared scope in media) and pulls declarations into them when possible
  • If inside @media does a declaration pull for anything outside @media
  • Correctly handles re-declarations, by ignoreing incoming via @extend (original overwrites)
  • Order of naming remains a predicatable add-to-tail fashion, and follows vertical order, then recursion in priority
  • Detects, and gives a trace of all rules that are part of an infinite loop of @extend recursion.