Permalink
Browse files

I don’t know what I am doing

  • Loading branch information...
1 parent 3baf6df commit 7b3abdb406b6615b66776d3fe2799c4a98cc1465 @alanhogan alanhogan committed Jun 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/kss.coffee
View
4 lib/kss.coffee
@@ -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 7b3abdb

Please sign in to comment.