Permalink
Browse files

Merge pull request #40 from alanhogan/fix-extends-pseudo

  • Loading branch information...
2 parents 396b85c + b880036 commit a758afcff9f9da5f05d79b47235a82ca90a0cbc5 Kyle Neath committed Aug 2, 2012
Showing with 12 additions and 5 deletions.
  1. +10 −3 example/public/javascripts/kss.js
  2. +2 −2 lib/kss.coffee

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -15,9 +15,9 @@ class KssStateGenerator
for stylesheet in document.styleSheets
idxs = []
for rule, idx in stylesheet.cssRules
- if (rule.type == CSSRule.STYLE_RULE) && pseudos.test(rule.selectorText)
+ while (rule.type == CSSRule.STYLE_RULE) && pseudos.test(rule.selectorText)
replaceRule = (matched, stuff) ->
- return ".pseudo-class-" + matched.replace(':', '')
+ return matched.replace(/\:/g, '.pseudo-class-')
@insertRule(rule.cssText.replace(pseudos, replaceRule))
# Takes a given style and attaches it to the current page.

0 comments on commit a758afc

Please sign in to comment.