forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.010.7 MiBa2e388fTahinli25 days ago298 commits

_one_code.scss198 lines, 4.1 KiBHistoryRawDownload
1// code: page parts in the one page language (docs/ui-language.md). Tokens only.
2
3// File view (blob page, RepoFile canvas): the sheet is the only box. The code sits on the sheet's
4// own surface, 13.5px mono on 22px lines, with a 72px number column and no ring or fill inside.
5.sheet > .file > .file-view {
6 background: none;
7 border: 0;
8 border-radius: 0;
9 padding: 10px 0;
10}
11
12.sheet > .file > .file-view .file-table {
13 font-family: 'IBM Plex Mono', monospace;
14 font-size: 13.5px;
15 line-height: 22px;
16
17 .ln {
18 box-sizing: border-box;
19 width: 72px;
20 min-width: 72px;
21 max-width: 72px;
22 padding: 0 18px 0 0;
23 background: var(--surface);
24 border-right: 0;
25 color: var(--muted);
26
27 a {
28 color: inherit;
29 }
30 }
31
32 .code {
33 padding: 0 16px 0 0;
34 }
35}
36
37// The line count reads as mono and quiet, the way the canvas sets it.
38.sheet > .sheet-tools > .mono {
39 font-family: 'IBM Plex Mono', monospace;
40 font-size: 13px;
41 color: var(--muted);
42 white-space: nowrap;
43}
44
45// Scrub (files at one commit): the same tree rows as the repo home, in the sheet.
46.sheet [data-scrub-tree] {
47 padding: 4px 0;
48}
49
50.sheet [data-scrub-tree] .tree-entry {
51 display: flex;
52 align-items: center;
53 gap: 10px;
54 height: 30px;
55 min-width: 0;
56 padding: 0 18px;
57}
58
59.sheet [data-scrub-tree] .tree-kind {
60 display: inline-flex;
61 flex: none;
62 color: var(--muted);
63}
64
65.sheet [data-scrub-tree] .kind-icon {
66 flex: none;
67 width: 14px;
68 height: 14px;
69 fill: none;
70 stroke: currentColor;
71}
72
73.sheet [data-scrub-tree] .tree-entry-name {
74 flex: 1 1 auto;
75 min-width: 0;
76 overflow: hidden;
77 font-family: 'IBM Plex Mono', monospace;
78 font-size: 13px;
79 white-space: nowrap;
80 text-overflow: ellipsis;
81 color: var(--text);
82 text-decoration: none;
83}
84
85.sheet [data-scrub-tree] .tree-entry:hover {
86 background: var(--surface-2);
87}
88
89// Markdown on a file page: the same reading column as the repo home README.
90.sheet > .file > .markdown-body {
91 max-width: 796px;
92 padding: 22px 28px 28px;
93}
94
95// Code in a sheet is one soft chip, the same radius everywhere.
96main code {
97 border-radius: 6px;
98}
99
100
101// A release's downloads wrap onto more lines instead of running past the sheet.
102.opened > .sub {
103 flex-wrap: wrap;
104 gap: 4px 16px;
105 min-width: 0;
106
107 > a {
108 min-width: 0;
109 max-width: 100%;
110 overflow: hidden;
111 text-overflow: ellipsis;
112 white-space: nowrap;
113 }
114}
115
116// Checks: the summary reads on one line, and Show checks opens its list as the shared panel under it,
117// over the page, so a tools row keeps its height.
118.checks-summary {
119 flex-wrap: nowrap;
120
121 .checks-details {
122 position: relative;
123 flex-basis: auto;
124
125 > .status-list {
126 position: absolute;
127 z-index: 30;
128 top: calc(100% + 6px);
129 left: 0;
130 width: max-content;
131 max-width: min(520px, calc(100vw - 32px));
132 margin: 0;
133 padding: 10px 14px;
134 }
135 }
136}
137
138// A commit's message under its tools row is text, not a code box: the title is the head already.
139.sheet > .sec > pre.commit-message {
140 margin: 0;
141 padding: 14px 0;
142 border: 0;
143 border-radius: 0;
144 background: none;
145 white-space: pre-wrap;
146}
147
148// Split diff columns: the numbers and the comment mark keep their width, the two code halves share
149// the rest.
150.diff-table.diff-split {
151 > colgroup > .col-plus {
152 width: 22px;
153 }
154
155 > colgroup > .col-ln {
156 width: 52px;
157 }
158}
159
160// A file's head reads in order, name, change and counts, with nothing pushed to the far end.
161.diff-file-header.sheet-tools {
162 justify-content: flex-start;
163 gap: 12px;
164}
165
166// Above the files: the count and the view choices on one line, the count first.
167.diff-head {
168 display: flex;
169 flex-wrap: wrap;
170 align-items: center;
171 gap: 6px 18px;
172 min-height: 32px;
173 padding: 0 4px;
174
175 > h2 {
176 margin: 0;
177 font-size: 15px;
178 font-weight: 600;
179 }
180
181 > .diff-toolbar {
182 margin: 0;
183 }
184}
185
186// A commit's status sits in its line as one more word, and its list opens as the shared panel.
187.commit-status {
188 display: inline-block;
189 vertical-align: baseline;
190
191 &[open] > .status-list {
192 left: 0;
193 right: auto;
194 width: max-content;
195 max-width: min(460px, calc(100vw - 32px));
196 padding: 10px 14px;
197 }
198}