1// This code includes software originally developed by Drew DeVault.
2//
3// Copyright 2017 Drew DeVault <sir@cmpwn.com>
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are met:
7//
8// 1. Redistributions of source code must retain the above copyright notice, this
9// list of conditions and the following disclaimer.
10//
11// 2. Redistributions in binary form must reproduce the above copyright notice,
12// this list of conditions and the following disclaimer in the documentation
13// and/or other materials provided with the distribution.
14//
15// 3. Neither the name of the copyright holder nor the names of its contributors
16// may be used to endorse or promote products derived from this software without
17// specific prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30.tree-list {
31 display: grid;
32 // mode name
33 grid-template-columns: auto 1fr fit-content(40em) auto auto;
34 font-family: $font-family-monospace;
35
36 svg {
37 color: #777;
38 }
39
40 .size {
41 text-align: right;
42 }
43
44 .name.blob a {
45 color: $gray-900;
46 }
47
48 .mode,
49 .commit,
50 .commit a,
51 .date,
52 .size {
53 color: $gray-700;
54 }
55
56 .name.blob {
57 text-overflow: ellipsis;
58 white-space: nowrap;
59 overflow: hidden;
60 }
61
62 .commit {
63 text-overflow: ellipsis;
64 white-space: nowrap;
65 overflow: hidden;
66 }
67
68 &>div {
69 padding: 0.1rem 0.5rem;
70 background: transparent;
71
72 &.id {
73 text-align: right;
74 }
75
76 &.comments {
77 text-align: center;
78 }
79
80 @for $i from 1 through 5 {
81 &:nth-child(5n+#{$i}) {
82 grid-column-start: $i;
83 }
84
85 // Striped rows
86 &:nth-child(10n+#{$i}) {
87 background: rgba(0, 0, 0, .05);
88 }
89 }
90 }
91}