Commits

Anonymous committed e372edc

opt docs

Comments (0)

Files changed (2)

 HEAD
     - FEATURE: ``CSSStyleDeclaration.setProperty`` has new option ``replace=True``. if True (DEFAULT) the given property will replace a present property. If False a new property will be added always. The difference to `normalize` is that two or more properties with the same name may be set, useful for e.g. stuff like::
 
-                background: red;
-                background: rgba(255, 0, 0, 0.5);
-
-            which defines the same property but only capable UAs use the last property value, older ones use the first value.
+            background: red;
+            background: rgba(255, 0, 0, 0.5);
+
+      which defines the same property but only capable UAs use the last property value, older ones use the first value.
 
     - FEATURE: Implemented API for ``MarginRule`` inside ``CSSPageRule``, see http://www.w3.org/TR/css3-page/. You can also use e.g. ``CSSPageRule['@top-left']`` to retrieve the MarginRule it it is set etc. All dict like methods should be there. If a margin is set twice or more all properties are merged into a single margin rule. Double set properties are all kept though (see above).
 
     - BUGFIX: Fixed issue for GoogleAppEngine (GAE) which somehow handles codecs differently. ``parseUrl`` should work now.
 
 
+Last Stable Version
+===================
+
 0.9.8
 -----
 0.9.8 final 111210
     + CHANGE: explicit `+` of any dimension, percentage of number value is kept now instead of being stripped as if put explicitly in the author SHOULD have meant something ;)
 
 
-
-Last Stable Version
-===================
+Archived Versions
+=================
 
 0.9.7
 -----
     - INTERNAL: Added ``tokenizer.push()``. Prodparser uses a global tokenizer now.
 
 
-Archived Versions
-=================
-
 0.9.6
 -----
 0.9.6 091007

src/cssutils/css/csspagerule.py

                                                            blockstartonly=True,
                                                            separateEnd=True)
             styletokens, braceorEOFtoken = self._tokensupto2(tokenizer, 
-                                                        blockendonly=True,
-                                                        separateEnd=True)
+                                                             blockendonly=True,
+                                                             separateEnd=True)
             nonetoken = self._nexttoken(tokenizer)
             if self._tokenvalue(startbrace) != u'{':
                 ok = False
-                self._log.error(
-                    u'CSSPageRule: No start { of style declaration found: %r' %
-                    self._valuestr(cssText), startbrace)
+                self._log.error(u'CSSPageRule: No start { of style declaration ' 
+                                u'found: %r' % 
+                                self._valuestr(cssText), startbrace)
             elif nonetoken:
                 ok = False
-                self._log.error(
-                    u'CSSPageRule: Trailing content found.', token=nonetoken)
+                self._log.error(u'CSSPageRule: Trailing content found.', 
+                                token=nonetoken)
                 
             selok, newselseq, specificity = self.__parseSelectorText(selectortokens)
             ok = ok and selok
 
             val, type_ = self._tokenvalue(braceorEOFtoken),\
-                       self._type(braceorEOFtoken)
+                         self._type(braceorEOFtoken)
+                         
             if val != u'}' and type_ != 'EOF':
                 ok = False
                 self._log.error(
         return self._finishInsertRule(rule, index)
 
     specificity = property(lambda self: self._specificity, 
-         doc=u"""Specificity of this page rule (READONLY). 
-                 Tuple of (f, g, h) where: 
-                
-                 - if the page selector has a named page, f=1; else f=0
-                 - if the page selector has a ':first' pseudo-class, g=1; 
-                 else g=0
-                 - if the page selector has a ':left' or ':right' pseudo-class, 
-                 h=1; else h=0 
-                 """)
+                           doc=u"""Specificity of this page rule (READONLY). 
+Tuple of (f, g, h) where: 
 
+ - if the page selector has a named page, f=1; else f=0
+ - if the page selector has a ':first' pseudo-class, g=1; else g=0
+ - if the page selector has a ':left' or ':right' pseudo-class, h=1; else h=0
+""")
 
     type = property(lambda self: self.PAGE_RULE, 
                     doc=u"The type of this rule, as defined by a CSSRule "