/* Styles for the ReST roles registered by pyTooling.Documentation.Sphinx. */

/* Previously injected into every document by a 'raw:: html' block in each project's doc/prolog.inc. */

/* Every value a project might want to change is a custom property, so it can be overridden without replacing
   this file. Put a stylesheet of your own after this one - 'html_css_files' in conf.py is appended in order -
   and redefine what you need:

     :root {
       --pyTooling-color-red: #b00020;
     }

   A property is only read where it is used below, so redefining one changes exactly the role that uses it. */
:root {
  --pyTooling-color-red:    #c00;
  --pyTooling-color-green:  #093;
  --pyTooling-color-blue:   #06f;
  --pyTooling-color-purple: #90c;

  --pyTooling-xlarge-size:  x-large;

  --pyTooling-table-cell-vertical-align: top;
  --pyTooling-table-list-margin:         0;
  --pyTooling-table-min-width:           50%;
}

span.bolditalic {
  font-weight: bold;
  font-style: italic;
}

span.underline {
  text-decoration: underline;
}

span.strike {
  text-decoration: line-through;
}

span.xlarge {
  font-size: var(--pyTooling-xlarge-size);
}

span.colorred {
  color: var(--pyTooling-color-red);
}

span.colorgreen {
  color: var(--pyTooling-color-green);
}

span.colorblue {
  color: var(--pyTooling-color-blue);
}

span.colorpurple {
  color: var(--pyTooling-color-purple);
}


/* Styles for the tables built by pyTooling.Documentation.Sphinx.

   The class is put on the table by the directive, so these rules reach only a table this package generated and
   never a table a document wrote by hand.

   Every declaration here is '!important', which is not laziness: it has to outrank a theme's own table rules, and
   a theme is chosen by the project rather than by this package, so its selectors can't be predicted. sphinx_rtd_
   theme's '.rst-content table.docutils td' is two classes and two elements, which beats anything this file can
   write without naming that theme. The values stay overridable regardless, because a project redefines the
   custom property rather than the declaration - and a custom property has no specificity to lose. */

/* A row is as tall as its tallest cell, and in a dependency table that is the cell holding a dependency tree.
   Centring the other three vertically pushes a package's name into the middle of an otherwise empty column, far
   away from the row it belongs to. */
table.dependency-table td,
table.dependency-table th {
  vertical-align: var(--pyTooling-table-cell-vertical-align) !important;
}

/* A list inside a cell is the cell's whole content, so the margin a theme puts below it for running text is a gap
   between the last bullet and the cell's border with nothing in it. */
table.dependency-table td > ul,
table.dependency-table td ul,
table.dependency-table td li > p,
table.dependency-table td li > ul,
table.dependency-table td > p {
  margin-bottom: var(--pyTooling-table-list-margin) !important;
}

/* Without a floor, every table is as wide as its widest row, so a table of one short dependency and a table of a
   four-level tree sit beside each other at wildly different widths and the page reads as ragged. */
table.dependency-table {
  min-width: var(--pyTooling-table-min-width);
}
