fix: keep mobile file sort controls visible (#5977)
This commit is contained in:
1 parent
7b7ff8ae8f
commit
0bb2768754
2 files changed
+53
-4
No files matched your search
@@ -0,0 +1,22 @@
|
|||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
import { resolve } from "node:path";
|
||||||
|
|
||||||
|
const mobileCss = readFileSync(resolve(__dirname, "../mobile.css"), "utf8");
|
||||||
|
|
||||||
|
const normalizedCss = mobileCss.replace(/\s+/g, " ");
|
||||||
|
|
||||||
|
describe("mobile file listing styles", () => {
|
||||||
|
it("hides file row metadata without hiding list header sort controls", () => {
|
||||||
|
expect(normalizedCss).toContain(
|
||||||
|
"#listing.list .item:not(.header) .size { display: none;"
|
||||||
|
);
|
||||||
|
expect(normalizedCss).toContain(
|
||||||
|
"#listing.list .item:not(.header) .modified { display: none;"
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(normalizedCss).not.toMatch(
|
||||||
|
/#listing\.list \.item \.(size|modified) \{ display: none;/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -14,12 +14,27 @@
|
|||||||
body {
|
body {
|
||||||
padding-bottom: 5em;
|
padding-bottom: 5em;
|
||||||
}
|
}
|
||||||
#listing.list .item .size {
|
#listing.list .item:not(.header) .size {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#listing.list .item .name {
|
#listing.list .item:not(.header) .name {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
#listing.list .item.header .name {
|
||||||
|
margin-right: 0;
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
#listing.list .item.header .size {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
#listing.list .item.header .modified {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
#listing.list .item.header p {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
#more {
|
#more {
|
||||||
display: inherit;
|
display: inherit;
|
||||||
}
|
}
|
||||||
@@ -162,10 +177,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 450px) {
|
@media (max-width: 450px) {
|
||||||
#listing.list .item .modified {
|
#listing.list .item:not(.header) .modified {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#listing.list .item .name {
|
#listing.list .item:not(.header) .name {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
#listing.list .item.header {
|
||||||
|
padding: 0.75em 0.5em;
|
||||||
|
}
|
||||||
|
#listing.list .item.header .name {
|
||||||
|
width: 34%;
|
||||||
|
}
|
||||||
|
#listing.list .item.header .size {
|
||||||
|
width: 24%;
|
||||||
|
}
|
||||||
|
#listing.list .item.header .modified {
|
||||||
|
width: 42%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user