progs/pprint/style.css
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 29 Nov 2024 18:58:18 +0000
changeset 975 ae5c03560d4d
parent 742 b5b5583a3a08
permissions -rwxr-xr-x
update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
742
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     1
@media print {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
  @page { margin: 0; }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     3
  body { margin: 1.6cm; }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
body {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
  font-family: Calibri, Segoe, "Segoe UI", "Gill Sans", "Gill Sans MT", sans-serif;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    11
/* It's supposed to look like a tree diagram */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    12
.tree, .tree ul, .tree li {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    13
    list-style: none;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    14
    margin: 0;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    15
    padding: 0;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    16
    position: relative;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    17
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    18
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    19
.tree {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    20
    margin: 0 0 1em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    21
    text-align: center;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    22
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    23
.tree, .tree ul {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    24
    display: table;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    25
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    26
.tree ul {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    27
  width: 100%;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    28
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    29
    .tree li {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    30
        display: table-cell;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    31
        padding: .5em 0;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    32
        vertical-align: top;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    33
    }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    34
        /* _________ */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    35
        .tree li:before {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    36
            outline: solid 1px #666;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    37
            content: "";
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    38
            left: 0;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    39
            position: absolute;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    40
            right: 0;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    41
            top: 0;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    42
        }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    43
        .tree li:first-child:before {left: 50%;}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    44
        .tree li:last-child:before {right: 50%;}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    45
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    46
        .tree code, .tree span {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    47
            border: solid .1em #666;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    48
            border-radius: .2em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    49
            display: inline-block;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    50
            margin: 0 .2em .5em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    51
            padding: .2em .5em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    52
            position: relative;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    53
        }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    54
        /* If the tree represents DOM structure */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    55
        .tree code {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    56
            font-family: monaco, Consolas, 'Lucida Console', monospace;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    57
        }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    58
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    59
            /* | */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    60
            .tree ul:before,
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    61
            .tree code:before,
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    62
            .tree span:before {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    63
                outline: solid 1px #666;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    64
                content: "";
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    65
                height: .5em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    66
                left: 50%;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    67
                position: absolute;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    68
            }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    69
            .tree ul:before {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    70
                top: -.5em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    71
            }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    72
            .tree code:before,
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    73
            .tree span:before {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    74
                top: -.55em;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    75
            }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    76
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    77
/* The root node doesn't connect upwards */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    78
.tree > li {margin-top: 0;}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    79
    .tree > li:before,
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    80
    .tree > li:after,
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    81
    .tree > li > code:before,
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    82
    .tree > li > span:before {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    83
      outline: none;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    84
    }
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    85
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    86
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    87
/* Create two equal columns that floats next to each other */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    88
.column {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    89
  float: left;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    90
  width: 40%;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    91
  padding: 10px;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    92
}
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    93
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    94
/* Clear floats after the columns */
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    95
.row:after {
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    96
  content: "";
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    97
  display: table;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    98
  clear: both;
b5b5583a3a08 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    99
}