﻿
/*  ************************************************************************  *
 *                                kernel.css                                  *
 *  ************************************************************************  */

/*  This style sheet is for all document pages in the Kernel subweb. Include 
    after MASTER.CSS and DOCUMENT.CSS.  */

/*  Familiarity with both those stylesheets and their comments is assumed!  */

/*  ************************************************************************  */
/*  Character Styles  */

/*  ====  */
/*  Font  */

span.argument, 
span.placeholder {
  font-style:italic
} 

span.attribute, 
span.bcdobj,                    /* BCD object (boot entry) */
span.bcdopt,                    /* BCD element (boot option) */
span.bit, 
span.class, 
span.command, 
span.constant,
span.directive, 
span.enum, 
span.env,                       /* environment variable */
span.function, 
span.functionprefix,            /* prefix for function name */
span.guid,                      /* GUID */
span.instruction, 
span.interface, 
span.intrinsic, 
span.label, 
span.licvalue,                  /* license value */
span.keyword, 
span.literal, 
span.macro, 
span.member, 
span.method, 
span.object, 
span.procedure,
span.register, 
span.regkey,                    /* registry key */
span.regsz,                     /* registry string data */
span.regvalue,                  /* registry value */
span.routine,
span.section,
span.statement, 
span.struct, 
span.switch, 
span.symbol, 
span.tag, 
span.type, 
span.union, 
span.value, 
span.variable {
  font-weight:bold
}

/*  A bit of a hack, but sometimes we put symbols in headings and mark them 
    as symbols, being happy to have the reason show as a tooltip but not 
    with the intention that they show as bold, etc.  */

h4.EventName span.symbol {
  font-weight:normal;
}

/*  ======  */
/*  Colour  */

/*  Qualifiers for colour-coded documentation status - increasing order of 
    importance is very much depended on  */ 

span.undocumented {
  background-color:#FFFF00;     /* highlighted yellow */
}

span.delayed {                  /* not initially documented */
  background-color:#FFFFCC;     /* shaded yellow */
}

span.declared {                 /* undocumented but declared */
  background-color:#FFEE99;     /* shaded orange */
}

span.minwin {                   /* undocumented but declared in "minwin" disclosure */
  background-color:#FFCC66;     /* highlighted orange */
}

span.obsolete {                 /* documented as obsolete */
  background-color:#CCCCCC;     /* shaded gray */
}

span.reserved {                 /* documented as reserved */
  background-color:#FFCCCC;     /* shaded red */
}

/*  Shading to show differences, e.g., in source-code fragments  */

span.addition {
  background-color: #EEEEFF;
}
span.essential {
  background-color: #FFEEEE;
}

/*  Miscellany - do we ever still use these?  */

span.estimate {
  color:#888888;
}

span.supposition {
  color:#999999;
}

/*  =========  */
/*  Word Wrap  */

span.command, 
span.literal, 
span.switch {
  white-space:nowrap;
}

/*  ************************************************************************  */
/*  Paragraph Styles  */

pre.EventDescription {
  max-width:40em;
  white-space:pre-line;
}

/*  ************************************************************************  */
/*  Tables  */

/*  The house style for tables is defined in DOCUMENT.CSS. Here, we decorate 
    for particular purposes, especially for right-alignment of text in some 
    columns. 

    CLEAN SLATE! Sort out everything else, then come back to the ridiculous 
    mess that CSS makes of table styling.  */

/*  ========================================================================  */

/*  Every TABLE of ProductVersions starts with a single COL of class 
    ProductVersion. To its right is at least one COL of class Package. When 
    there is more than one, a TH across them all is explicitly assigned to 
    Distribution and ought to be centered across them all.  */

table.ProductVersions th, 
table.ProductVersions td {
  white-space:nowrap;
}

table.ProductVersions th.Distribution {
  text-align:center;
}

/*  ========================================================================  */

/*  Every TABLE of FileVersions is a simple grid with columns assigned to 
    classes in the order: Version, Date, Size, Package. We want that the 
    sizes, being nothing but numbers, are right-aligned.  */

table.FileVersions th, 
table.FileVersions td {
  white-space:nowrap;
}

table.FileVersions col.Size, 
table.FileVersions th:first-child + th + th, 
table.FileVersions td:first-child + td + td {
  text-align:right;
}

/*  Much more complicated is a TABLE of NamedFileVersions. It has an extra 
    column: Version, Name, Date, Size, Package. A complication is that cells 
    in the Version column may span rows. In such case, each TR except the 
    first has class VersionImplied. Cells in the Package column also may 
    span rows, but this presents no complication since this column always is 
    to the right of all sizes.  */

table.NamedFileVersions th, 
table.NamedFileVersions td {
  white-space:nowrap;
}

table.NamedFileVersions col.Size, 
table.NamedFileVersions th:first-child + th + th + th, 
table.NamedFileVersions td:first-child + td + td + td {
  text-align:right;
}

table.NamedFileVersions tr.VersionImplied td:first-child + td + td {
  text-align:right;
}

table.NamedFileVersions tr.VersionImplied td:first-child + td + td + td {
  text-align:left;
}

/*  ========================================================================  */

/*  The tables of Functions might be left to defaults. Notably, no text 
    alignment is wanted in any column. Recommended practice is to keep all 
    text brief, but word lengths in the Name column are not ours to control. 
    On a narrow screen, the other columns are the ones that will get 
    narrowed. Text in these must in some cases spread over multiple lines 
    and gets silly if word-wrapping spreads it over even more lines. Even in 
    the Names column, the space-free name may be followed by an ordinal in 
    parentheses after a space, and this too looks better if not broken at 
    the space If only for now, disable wrapping in all cells.  */

table.Functions th, 
table.Functions td {
  white-space:nowrap;
}

/*  ========================================================================  */

/*  Every TABLE of a structure's changing sizes through a history of Windows 
    versions has columns with classes in the following order: Version, then 
    Size. But there can be, and typically is, more than one Size column. 
    Four is not unknown. Easiest is to specify right-alignment for the whole 
    table, and then fix the Version column.  */

table.Sizes th, 
table.Sizes td {
  text-align:right;
  white-space:nowrap;
}

table.Sizes col.Version,
table.Sizes th:first-child,
table.Sizes td:first-child {
  text-align:left;
}

table.Sizes tr.VersionImplied td:first-child {
  text-align:right;
}

/*  Very unusually, a TABLE of changing sizes may have two columns of 
    version numbers. This occurs when there is not just the Windows version 
    to track but also some sort of version number in the structure.  */

table.Sizes.ForTwoVersions col.Version, 
table.Sizes.ForTwoVersions th:first-child + th, 
table.Sizes.ForTwoVersions td:first-child + td {
  text-align:left;
}

table.Sizes.ForTwoVersions tr.VersionImplied td:first-child {
  text-align:left;
}

table.Sizes.ForTwoVersions tr.VersionImplied td:first-child + td {
  text-align:right;
}

/*  Among the downsides of right-aligning by default is of course that any 
    column of remarks to the right of the sizes will also be right-aligned. 
    This too is only rarely needed, e.g., to explain a differentiation of 
    sizes, but is made into a right pain.  */

table.Sizes1 th, 
table.Sizes1 td {
  text-align:left;
  white-space:nowrap;
}

table.Sizes1 col.Size 
table.Sizes1 th:first-child + th, 
table.Sizes1 td:first-child + td {
  text-align:right;
}

table.Sizes1 tr.VersionImplied td:first-child {
  text-align:right;
}

table.Sizes1 tr.VersionImplied td:first-child + td {
  text-align:left;
}

table.Sizes2 th, 
table.Sizes2 td {
  text-align:left;
  white-space:nowrap;
}

table.Sizes2 col.Size 
table.Sizes2 th:first-child + th, 
table.Sizes2 td:first-child + td, 
table.Sizes2 th:first-child + th + th, 
table.Sizes2 td:first-child + td + td {
  text-align:right;
}

table.Sizes2 tr.VersionImplied td:first-child {
  text-align:right;
}

table.Sizes2 tr.VersionImplied td:first-child + td +td {
  text-align:left;
}

/*  ========================================================================  */

/*  Tables of line numbers would ideally have right-aligned line numbers, 
    but which columns have line numbers? The obvious answer - columns that 
    have LineNumber for their CLASS - is no help with modern browsers. 

    In practice, it turns out that left-aligned line numbers don't look so 
    bad. Better to leave this trouble for now, if not forever.  */

table.LineNumbers th, 
table.LineNumbers td {
  white-space:nowrap;
}

/*  ========================================================================  */

/*  Quite likely in actual practice, all tabular data would better not wrap 
    to multiple lines within a cell: let the author control this with line 
    breaks. For better or worse, we presently impose this only for tables 
    whose CLASS is known to suggest that cells may have deliberately 
    multi-lined text.  */

table.Addresses th,
table.Addresses td {
  white-space:nowrap;
}

table.Constants th, 
table.Constants td {
  white-space:nowrap;
}

table.Enum th, 
table.Enum td {
  white-space:nowrap;
}

table.Flags th, 
table.Flags td {
  white-space:nowrap;
}

table.Struct th, 
table.Struct td {
  white-space:nowrap;
}

table.Union th, 
table.Union td {
  white-space:nowrap;
}

/*  ========================================================================  */

/*  A table of details about an event provider is unusual in that a heading 
    begins each row.  */

table.EventProvider th {
  border-bottom-width:1px;
  border-right-width:2px;
  font-weight:normal;
}

table.EventProvider th, 
table.EventProvider td {
  white-space:nowrap;
}

table.EventChannels th, 
table.EventChannels td {
  white-space:nowrap;
}

/*  The tabular presentation of an event also has a heading on each row.  */

table.Event th {
  border-bottom-width:1px;
  border-right-width:2px;
  font-weight:normal;
}

table.Event th, 
table.Event td {
  white-space:nowrap;
}

/*  Another tabular presentation that has a heading on each row:  */

table.Registry th {
  border-bottom-width:1px;
  border-right-width:2px;
  font-weight:normal;
}

table.Registry th, 
table.Registry td {
  white-space:nowrap;
}

/*  ************************************************************************  *
 *        Copyright © 2007-2023. Geoff Chappell. All rights reserved.         *
 *  ************************************************************************  */
