Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Hide what each narrow layout drops in one rule
Nine rules each set display: none, scattered out of the stylesheet's section order. Each block now hides its elements in one list, in section order, and the rest of its rules follow in that order too.
Diffstat (limited to '')
-rw-r--r--assets/cgit.css86
1 file changed, 32 insertions, 54 deletions
diff --git a/assets/cgit.css b/assets/cgit.css
index 78b3ee2..ffbc902 100644
--- a/assets/cgit.css
+++ b/assets/cgit.css
@@ -1302,14 +1302,8 @@ div#cgit form.login input[type="password"] {
}
@media (max-width: 900px) {
- div#cgit .tabs .search {
- display: none;
- }
-
- div#cgit #header .branch-switch {
- display: none;
- }
-
+ div#cgit #header .branch-switch,
+ div#cgit .tabs .search,
div#cgit table.list th.col-author,
div#cgit table.list td.col-author {
display: none;
@@ -1340,44 +1334,54 @@ div#cgit form.login input[type="password"] {
}
@media (max-width: 640px) {
- div#cgit .tabs a {
- padding: 0.3em 0.4em;
- }
-
+ div#cgit #header .owner,
div#cgit .col-desc,
div#cgit .col-owner,
- div#cgit .col-links {
- display: none;
- }
-
+ div#cgit .col-links,
div#cgit table.log th.col-count,
- div#cgit table.log td.col-count {
+ div#cgit table.log td.col-count,
+ div#cgit th.ls-mode,
+ div#cgit td.ls-mode,
+ div#cgit th.ls-links,
+ div#cgit td.ls-links,
+ div#cgit div.cgit-panel,
+ div#cgit table.diffstat td.mode {
display: none;
}
- div#cgit table.list td {
- overflow-wrap: anywhere;
+ div#cgit #header {
+ grid-template-columns: auto 1fr;
+ grid-template-areas:
+ "logo heading"
+ "desc desc";
+ row-gap: 6px;
}
- div#cgit th.ls-mode,
- div#cgit td.ls-mode,
- div#cgit th.ls-links,
- div#cgit td.ls-links {
- display: none;
+ div#cgit #header::before {
+ grid-column: 1 / -1;
}
- div#cgit td.ls-size {
- width: auto;
+ div#cgit #header h1.main {
+ white-space: normal;
+ overflow-wrap: anywhere;
}
- div#cgit table.diffstat td.mode {
- display: none;
+ div#cgit .tabs a {
+ padding: 0.3em 0.4em;
}
div#cgit span.snapshot {
white-space: normal;
}
+ div#cgit table.list td {
+ overflow-wrap: anywhere;
+ }
+
+ div#cgit td.ls-size {
+ width: auto;
+ }
+
div#cgit table.repolist th.col-name,
div#cgit table.repolist td.col-name {
width: 100%;
@@ -1391,36 +1395,10 @@ div#cgit form.login input[type="password"] {
text-align: right;
}
- div#cgit #header {
- grid-template-columns: auto 1fr;
- grid-template-areas:
- "logo heading"
- "desc desc";
- row-gap: 6px;
- }
-
- div#cgit #header .owner {
- display: none;
- }
-
- div#cgit #header::before {
- grid-column: 1 / -1;
- }
-
- div#cgit #header h1.main {
- white-space: normal;
- overflow-wrap: anywhere;
- }
-
- div#cgit div.cgit-panel {
- display: none;
- }
-
div#cgit div.notes {
float: none;
margin-left: 0;
}
-
}
@media (forced-colors: active) {