diff --git a/rinoh/style.py b/rinoh/style.py
index <HASH>..<HASH> 100644
--- a/rinoh/style.py
+++ b/rinoh/style.py
@@ -702,7 +702,7 @@ class StyleParseError(Exception):
 
 def parse_selector_args(selector_args):
     args, kwargs = [], {}
-    chars = iter(selector_args)
+    chars = CharIterator(selector_args)
     while True:
         char = eat_whitespace(chars)
         if char is None:
@@ -722,6 +722,24 @@ def parse_selector_args(selector_args):
     return args, kwargs
 
 
+class CharIterator(str):
+    def __init__(self, string):
+        super().__init__(string)
+        self._iter = iter(string)
+        self._pushed_back = []
+
+    def __iter__(self):
+        return self
+
+    def __next__(self):
+        if self._pushed_back:
+            return self._pushed_back.pop(0)
+        return next(self._iter)
+
+    def push_back(self, char):
+        self._pushed_back.insert(char, 0)
+
+
 def parse_keyword(first_char, chars):
     keyword_chars = [first_char]
     for first_char in chars:
CharIterator: allow "rewinding" the char iterator