Package cssutils :: Module serialize :: Class Preferences |
[hide private]
[frames] | no frames]

# Class Preferences

source code

    object --+
             |
            Preferences

> controls output of CSSSerializer

> defaultAtKeyword = True
>   Should the literal @keyword from src CSS be used or the default form, e.g. if `True`: `@import` else: `@i\mport`
> defaultPropertyName = True

>   Should the normalized propertyname be used or the one given in the src file, e.g. if `True`: `color` else: `c\olor`

>   Only used if `keepAllProperties==False`.

> importHrefFormat = None
>   Uses hreftype if `None` or explicit `'string'` or `'uri'`
> indent = 4 * ' '
>   Indentation of e.g Properties inside a CSSStyleDeclaration
> keepAllProperties = False
>   If `True` all properties set in the original CSSStylesheet are kept meaning even properties set twice with the exact same same name are kept!
> keepComments = True
>   If `False` removes all CSSComments
> lineNumbers = False
>   Only used if a complete CSSStyleSheet is serialized.

> lineSeparator = u'

'

  > How to end a line. This may be set to e.g. u'' for serializing of CSSStyleDeclarations usable in HTML style attribute.

  omitLastSemicolon = True
    If `True` omits ; after last property of CSSStyleDeclaration
  removeInvalid = True
    Omits invalid rules, MAY CHANGE!

Instance Methods | [hide private]
__init__(self, indent=`u'``` `'`, lineSeparator=`u'``\n``'`) Always use named instead of positional parameters | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, indent=`u'``` `'`, lineSeparator=`u'``\n``'`) (Constructor) | source code
Always use named instead of positional parameters Overrides: object.__init__