Share dirListing.css across platforms and remove gtk ifdef
Categories
(Toolkit :: Themes, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: ntim, Assigned: aminomancer)
References
Details
(Whiteboard: [fidefe-2022-mr1-css-linting] )
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The Windows/MacOS versions are almost the same, with the Windows version having an icon exception for GTK, let's just use the Windows version as the shared one to avoid maintaining 2 versions.
Comment 1•3 years ago
|
||
To also remove the preprocessing instruction, in addition to moving the file to shared
, the simplest solution is probably to have a class on the body set from the (already present) inline script tag in https://searchfox.org/mozilla-central/source/netwerk/streamconv/converters/nsIndexedToHTML.cpp#334 that represents the navigator.platform
, and then using either CSS variables or just a more specific selector to overwrite the "up" and directory icons on gtk.
Having said that - as of bug 1750440 this page adapts to the prefers-colors
media query, and that can be out of sync with the GTK theme, so I think we could also just ensure we ship the Windows "up" and "directory" icons on linux as well...
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
(In reply to :Gijs (he/him) from comment #1)
To also remove the preprocessing instruction, in addition to moving the file to
shared
, the simplest solution is probably to have a class on the body set from the (already present) inline script tag in https://searchfox.org/mozilla-central/source/netwerk/streamconv/converters/nsIndexedToHTML.cpp#334 that represents thenavigator.platform
, and then using either CSS variables or just a more specific selector to overwrite the "up" and directory icons on gtk.Having said that - as of bug 1750440 this page adapts to the
prefers-colors
media query, and that can be out of sync with the GTK theme, so I think we could also just ensure we ship the Windows "up" and "directory" icons on linux as well...
I can work on this later today. While we're at it, we could update the Windows icons to more resemble Windows 11's, or maybe something more platform-neutral. I'll see if I can discern what the average folder icon looks like lol
Comment 3•3 years ago
|
||
(In reply to Shane Hughes [:aminomancer] from comment #2)
I can work on this later today. While we're at it, we could update the Windows icons to more resemble Windows 11's, or maybe something more platform-neutral. I'll see if I can discern what the average folder icon looks like lol
That would be nice - do you still have time to work on this? No worries if not! We can also just fix the preprocessing stuff here and update the folder icons in a separate bug.
Assignee | ||
Comment 4•3 years ago
|
||
Yes, I'm working on it now. Though I might need your help with, like, the right way to organize the directories and manifests
Assignee | ||
Comment 5•3 years ago
|
||
I ended up using blue versions for macOS and yellow for anything else. I get the sense from this that navigator.platform is always "MacIntel" on a macOS build. Is that right? So I don't need to say something like body[platform^="Mac"] .dir::before
as "MacPPC" has just been removed entirely?
Assignee | ||
Comment 6•3 years ago
|
||
Also update raster folder icons: use Windows 11 style folder icons,
and double the base image size to account for window scaling.
Use the same PNG icons across platforms, but use a blue version
for macOS. Remove the preprocessing instruction to simplify the
manifests. Instead, use a markup attribute to pass platform to CSS,
which is set by a script generated by nsIndexedToHTML.cpp.
Updated•3 years ago
|
Comment 8•3 years ago
|
||
bugherder |
Description
•