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