Next / Previous / Contents / TCC Help System / NM Tech homepage

5. The style sheet

The style sheet displayed here is the actual CSS (Cascading Style Sheets, Level 2) file, in literate-programming form.

birdnotes.css
/* Style sheet for bird notes.  Do not edit this file directly;
 * it is generated automatically from this documentation:
 *   http://www.nmt.edu/~shipman/aba/doc/noteweb/
 */

5.1. General style

The author prefers a pale yellow background and not a stark white.

birdnotes.css
body
{ background-color: #ffffee; /* Very pale yellow */
}

5.2. Inline markup rules

Here are some rules for styling inline content. The span.loc-label rule is used to italicize inline labels that set off paragraphs.

birdnotes.css
span.loc-label
{   font-style: italic;
}

The span.bird-name rule styles species names. The text is dark green, and boldfaced.

birdnotes.css
span.bird-name
{   color: #007722;             /* Dark green */
    font-weight: bold;
}

The label “Notable:” needs to stand out, so we set it in maroon type, surrounded by a thin red box.

birdnotes.css
span.notable
{   font-weight: bold;
    color: maroon;
    border-style: solid;
    border-width: 1px;
    border-color: red;
    padding: 1px;
}

These two rules are used to mark up genus names and literature citations, both of which are traditionally italicized.

birdnotes.css
span.genus
{   font-style: italic;
}
span.cite
{   font-style: italic;
}

5.3. table.seasons

In order to use borders inside table rows and cells, we must select the “separate borders” table model for the index page.

birdnotes.css
table.seasons
{ border-collapse: collapse;
}

5.4. Seasonal column markup rules: th.winter, etc.

Columns in the index table are color-coded according to the four reporting seasons for Audubon Field Notes. We provide rules for both heading (th) and normal (td) table cells. The class names are the season names. All cells have borders on the left and right, so that the entire table is ruled.

birdnotes.css
th.winter, td.winter
{   background-color: #befaff;  /* ice blue */
    border-left: 1px solid black;
    border-right: 1px solid black;
}
th.spring, td.spring
{   background-color: #9affa5;  /* spring green */
    border-left: 1px solid black;
    border-right: 1px solid black;
}
th.summer, td.summer
{   background-color: #fff870;  /* pale yellow */
    border-left: 1px solid black;
    border-right: 1px solid black;
}
th.fall, td.fall
{   background-color: #eeaa3a;  /* dark orange */
    border-left: 1px solid black;
    border-right: 1px solid black;
}

5.5. CSS rules for rows of the index table

These rules style the rows in the index table. We want rules around the bottom, left, and right sides of the row.

birdnotes.css
tr.year-row
{   border-bottom: 1px solid black;
    border-left: 1px solid black;
    border-right:  1px solid black;
}

To help the reader's eye track across the table, we make every fifth row's bottom border thicker. The year-group class is added for rows whose years are evenly divisible by 5.

birdnotes.css
tr.year-group
{   border-bottom: 3px solid black;
}

5.6. th.row-label: The row label

This rule is used to boldface the year that labels each row of the index table.

birdnotes.css
th.row-label
{   font-weight: bold;
}

5.7. div.loc-child: Indented child block

This style element is used for children of the daily summary, and in other places where we want to set an indented block off with a little more vertical space, and use a hanging indent so continuation lines are indented further.

birdnotes.css
div.loc-child
{   margin-top: 0.25em;
    margin-bottom: 0.25em;
    margin-left: 3em;
    text-indent: -1em;
}

5.8. div.day-summary: Daily summary block

The entire daily summary block is set inside a thin solid border, on a light gray background.

birdnotes.css
div.day-summary
{   margin-left: 1em;           /* Indent on left */
    margin-bottom: 1em;         /* Add space below */
    border-style: solid;        /* Solid border */
    border-width: 1px;          /* One pixel wide */
    padding: 10px;              /* Leave room inside the box */
    background-color: #eee;     /* Light gray background */
}

5.9. div.loc-def: Location definition

This rule styles the block containing the definition of a locality code. The block is indented and boldfaced.

birdnotes.css
div.loc-def
{   margin-left: 2em;
    font-weight: bold;
}

5.10. div.loc-narrative: Locality narrative

The narrative that describes a locality should be indented further than its parent, but with a “hanging indent” so that continuation lines, if any, will be indented even further.

birdnotes.css
div.loc-narrative
{  margin-left: 3em;
   margin-top: 3px;
   text-indent: -1em;
   font-weight: normal;
}

5.11. div.para: Ordinary paragraphs

This rule styles ordinary paragraphs in any narrative content.

birdnotes.css
div.para
{   margin-left: 1em;
    margin-top: 0.2em;
}

5.12. div.form: General form-related data

This rule styles the block for each form of bird. The block is indented, with a bit of space above, and hanging indentation so the first line is not indented.

birdnotes.css
div.form
{   margin-top: 0.1em;
    margin-left: 1em;
    text-indent: -1em;
}

Because notable records are displayed in a red-bordered box, they need a bit more margin, or adjacent boxes will overlap. Hence this variant of the above rule:

birdnotes.css
div.notable-form
{   margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 1em;
    text-indent: -1em;
}

5.13. div.floc: Multiple sightings

This rule applies to the rendering of sighting data when there are multiple sightings for a given kind of bird. We indent these sightings an additional 2 ems.

birdnotes.css
div.floc
{   margin-left: 2em;
}