예제 #1
0
 class colored_td(html.td):
     style = html.Style(color='#005E8C',
                        padding='5px',
                        border='2px solid #005E8C',
                        text_align='left',
                        white_space='pre-wrap',
                        font_size='14px')
예제 #2
0
 class th(html.th):
     style = html.Style(color='#0094ce',
                        padding='5px',
                        border='2px solid #005E8C',
                        text_align='left',
                        font_weight='bold',
                        font_size='15px')
예제 #3
0
def test_alternating_style():
    alternating = (
        html.Style(background="white"),
        html.Style(background="grey"),
    )

    class my(html):
        class li(html.li):
            def style(self):
                i = self.parent.index(self)
                return alternating[i % 2]

            style = property(style)

    x = my.ul(my.li("hello"), my.li("world"), my.li("42"))
    u = unicode(x)
    assert u == ('<ul><li style="background: white">hello</li>'
                 '<li style="background: grey">world</li>'
                 '<li style="background: white">42</li>'
                 '</ul>')
예제 #4
0
 class h3(html.h3):
     style = html.Style(color='#0094ce')
예제 #5
0
 class h2(html.h2):
     style = html.Style(color='#0094ce')
예제 #6
0
 class h1(html.h1):
     style = html.Style(color='#0094ce')
예제 #7
0
 class table(html.table):
     style = html.Style(border='2px solid #005E8C',
                        margin='16px 0px',
                        color='#005E8C',
                        font_size='15px')
예제 #8
0
 class body(html.body):
     style = html.Style(background_color='#F0F0EE')
예제 #9
0
 class th(html.th):
     style = html.Style(padding='5px', border='1px solid #E6E6E6', text_align='left', font_weight='bold')
예제 #10
0
 class td(html.td):
     style = html.Style(padding='5px', border='1px solid #E6E6E6', text_align='left')
예제 #11
0
 class table(html.table):
     style = html.Style(border='1px solid #e6e6e6', margin='16px 0px', color='#999', font_size='12px')
예제 #12
0
 class body(html.body):
     style = html.Style(font_size="12pt")