Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve table styling by imitating Word's table styles #12

Open
Athari opened this issue Mar 1, 2018 · 0 comments
Open

Improve table styling by imitating Word's table styles #12

Athari opened this issue Mar 1, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@Athari
Copy link
Owner

Athari commented Mar 1, 2018

Customizing borders of tables is a mess. Removing table outer borders requires customizing every cell.

Look into supporting table styles like in Microsoft Word, at least for borders, but possibly for colors and alignment.

Example Word style:

<w:style w:type="table" w:styleId="InfoTable">
  <w:pPr>
    <w:spacing w:after="0pt" w:line="12pt" w:lineRule="auto"/>
  </w:pPr>
  <w:rPr>
    <w:rFonts w:ascii="Arial Narrow" w:hAnsi="Arial Narrow"/>
    <w:sz w:val="19"/>
  </w:rPr>
  <w:tblPr>
    <w:tblBorders>
      <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
      <w:start w:val="single" w:sz="4" w:space="0" w:color="auto"/>
      <w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
      <w:end w:val="single" w:sz="4" w:space="0" w:color="auto"/>
      <w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>
    </w:tblBorders>
  </w:tblPr>
  <w:tcPr>
    <w:vAlign w:val="center"/>
  </w:tcPr>
  <w:tblStylePr w:type="firstCol">
    <w:pPr>
      <w:jc w:val="start"/>
    </w:pPr>
    <w:rPr>
      <w:b/>
    </w:rPr>
    <w:tblPr/>
    <w:tcPr>
      <w:tcBorders>
        <w:top w:val="nil"/>
        <w:start w:val="nil"/>
        <w:bottom w:val="nil"/>
        <w:end w:val="single" w:sz="4" w:space="0" w:color="auto"/>
        <w:insideH w:val="nil"/>
        <w:insideV w:val="nil"/>
        <w:tl2br w:val="nil"/>
        <w:tr2bl w:val="nil"/>
      </w:tcBorders>
      <w:vAlign w:val="top"/>
    </w:tcPr>
  </w:tblStylePr>
</w:style>

Example Word style usage:

<w:tblPr>
  <w:tblStyle w:val="InfoTable"/>
  <w:tblLook w:firstRow="0" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="1" w:noVBand="1"/>
</w:tblPr>
@Athari Athari added the type:feature Feature label Mar 1, 2018
@Athari Athari added this to the 1.x milestone Mar 1, 2018
@Athari Athari self-assigned this Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant