1// This code includes software originally developed by Dustin Sallings.
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, .commit, .commit a, .date, .size {
49 color: $gray-700;
50 }
51
52 .name.blob {
53 text-overflow: ellipsis;
54 white-space: nowrap;
55 overflow: hidden;
56 }
57
58 .commit {
59 text-overflow: ellipsis;
60 white-space: nowrap;
61 overflow: hidden;
62 }
63
64 & > div {
65 padding: 0.1rem 0.5rem;
66 background: transparent;
67
68 &.id {
69 text-align: right;
70 }
71
72 &.comments {
73 text-align: center;
74 }
75
76 @for $i from 1 through 5 {
77 &:nth-child(5n+#{$i}) {
78 grid-column-start: $i;
79 }
80
81 // Striped rows
82 &:nth-child(10n+#{$i}) {
83 background: rgba(0,0,0,.05);
84 }
85 }
86 }
87}