To use your own serializing method the easiest is to subclass CSS
Serializer and overwrite the methods you like to customize.
|
|
|
|
|
|
|
|
|
_valid(self,
x)
checks if valid items only and if yes it item is valid |
source code
|
|
|
_wellformed(self,
x)
checks if wellformed items only and if yes it item is wellformed |
source code
|
|
|
_escapestring(self,
s,
delim=u' " ' )
escapes delim charaters in string s with delim |
source code
|
|
|
_getatkeyword(self,
rule,
default)
used by all @rules to get the keyword used
dependent on prefs setting defaultAtKeyword |
source code
|
|
|
_getpropertyname(self,
property,
actual)
used by all styledeclarations to get the propertyname used
dependent on prefs setting defaultPropertyName |
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
|
|
|
_uri(self,
uri)
returns uri enclosed in " if necessary |
source code
|
|
|
do_stylesheets_mediaquery(self,
mediaquery)
a single media used in medialist |
source code
|
|
|
|
|
|
|
do_CSSComment(self,
rule)
serializes CSSComment which consists only of commentText |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
do_pageselector(self,
seq)
a selector of a CSSPageRule including comments |
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
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|