Skip to content

Commit

Permalink
Add textTransform to spanStyle (it needed it for some reason) and abs…
Browse files Browse the repository at this point in the history
…tract out common attributes with paragraph.
  • Loading branch information
strichter committed Apr 10, 2018
1 parent f2386a1 commit 732df5e
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions src/z3c/rml/stylesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ class ISpanStyle(interfaces.IRMLDirectiveSignature):
description=u'The background color of the span.',
required=False)

textTransforms = attr.Choice(
title=u'Text Transforms',
description=u'Text transformations.',
choices=interfaces.TEXT_TRANSFORM_CHOICES,
required=False)


class SpanStyle(directive.RMLDirective):
signature = ISpanStyle
Expand All @@ -93,17 +99,7 @@ def process(self):
manager.styles[style.name] = style


class IBaseParagraphStyle(interfaces.IRMLDirectiveSignature):

fontName = attr.String(
title=u'Font Name',
description=u'The name of the font for the paragraph.',
required=False)

fontSize = attr.Measurement(
title=u'Font Size',
description=u'The font size for the text of the paragraph.',
required=False)
class IBaseParagraphStyle(ISpanStyle):

leading = attr.Measurement(
title=u'Leading',
Expand Down Expand Up @@ -157,16 +153,6 @@ class IBaseParagraphStyle(interfaces.IRMLDirectiveSignature):
description=u'The indentation that is kept for a bullet point.',
required=False)

textColor = attr.Color(
title=u'Text Color',
description=u'The color in which the text will appear.',
required=False)

backColor = attr.Color(
title=u'Background Color',
description=u'The background color of the paragraph.',
required=False)

wordWrap = attr.String(
title=u'Word Wrap Method',
description=(u'When set to "CJK", invoke CJK word wrapping'),
Expand Down Expand Up @@ -202,12 +188,6 @@ class IBaseParagraphStyle(interfaces.IRMLDirectiveSignature):
description=(u'Allow orphans.'),
required=False)

textTransforms = attr.Choice(
title=u'Text Transforms',
description=u'Text transformations.',
choices=interfaces.TEXT_TRANSFORM_CHOICES,
required=False)

endDots = attr.String(
title=u'End Dots',
description=u'Characters/Dots at the end of a paragraph.',
Expand Down

0 comments on commit 732df5e

Please sign in to comment.