Menu

#208 add table cell text color attribute

open
nobody
XSL (399)
3
2004-11-12
2004-09-10
Brad Taylor
No

One can set the table cell background color with <?dbfo
bgcolor="#000000"?>.

Would it be possible to add a <?dbfo color ?> pi to
change the text color by tweaking the color attribute of
the <fo:block> element?

something like this:
<row>
<entry><?dbfo color="#ffffff"
bgcolor="#000000">application availability</entry>
<entry namest="value" nameend="desc">24x7</entry>
</row>

to render something like:

<fo:table-row>
<fo:table-cell padding-left="2pt" padding-right="2pt"
padding-top="2pt" padding-bottom="2pt" background-
color="#000000" border-bottom-width="0.5pt" border-
bottom-style="solid" border-bottom-color="black" border-
right-width="0.5pt" border-right-style="solid" border-
right-color="black">
<fo:block color="white">application
availability</fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2pt" padding-right="2pt"
padding-top="2pt" padding-bottom="2pt" border-bottom-
width="0.5pt" border-bottom-style="solid" border-
bottom-color="black" number-columns-spanned="2">
<fo:block>24x7</fo:block>
</fo:table-cell>
</fo:table-row>

I'm trying to achieve the effect of white text on a black
background as a "row header".

Thanks!

Brad Taylor
brad.taylor@telus.com

Discussion

  • Brad Taylor

    Brad Taylor - 2004-09-10
    • priority: 5 --> 7
     
  • Michael(tm) Smith

    • priority: 7 --> 5
     
  • Michael(tm) Smith

    • priority: 5 --> 2
     
  • Michael(tm) Smith

    • priority: 2 --> 3
     
  • Robert Stayton

    Robert Stayton - 2004-12-08

    Logged In: YES
    user_id=193218

    This can be achieved with tabstyle and a customization of
    the table.cell.block.properties template (not attribute-set) in
    version 1.67.2 or later of the stylesheets. See this reference
    to get started. It describes the table.call.properties
    template, which adds properties to the fo:table-cell. The
    table.cell.block.properties template adds properties to the
    fo:block inside the cell. That's the one for setting the color
    on the font.

    http://lists.oasis-open.org/archives/docbook-
    apps/200412/msg00007.html