To use your own serializing method the easiest is to subclass CSS
Serializer and overwrite the methods you like to customize.
|
|
|
|
|
_atkeyword(self,
rule,
default)
returns default or source atkeyword depending on prefs |
source code
|
|
|
_indentblock(self,
text,
level)
indent a block like a CSSStyleDeclaration to the given level
which may be higher than self._level (e.g. |
source code
|
|
|
_propertyname(self,
property,
actual)
used by all styledeclarations to get the propertyname used
dependent on prefs setting defaultPropertyName and
keepAllProperties |
source code
|
|
|
|
|
_string(self,
s)
returns s encloded between "..." and escaped delim charater ",
escape line breaks n r and f |
source code
|
|
|
_uri(self,
uri)
returns uri enclosed in url() and "..." if necessary |
source code
|
|
|
_valid(self,
x)
checks items valid property and prefs.validOnly |
source code
|
|
|
do_CSSStyleSheet(self,
stylesheet)
serializes a complete CSSStyleSheet |
source code
|
|
|
do_CSSComment(self,
rule)
serializes CSSComment which consists only of commentText |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do_CSSUnknownRule(self,
rule)
serializes CSSUnknownRule
anything until ";" or "{...}"
+ CSSComments |
source code
|
|
|
|
|
do_css_SelectorList(self,
selectorlist)
comma-separated list of Selectors |
source code
|
|
|
|
|
do_css_CSSStyleDeclaration(self,
style,
separator=None)
Style declaration of CSSStyleRule |
source code
|
|
|
|
|
do_Property_priority(self,
priorityseq)
a Properties priority "!" S* "important" |
source code
|
|
|
do_css_CSSValue(self,
cssvalue)
serializes a CSSValue |
source code
|
|
|
|
|
do_stylesheets_mediaquery(self,
mediaquery)
a single media used in medialist |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|