Closed Bug 1699068 Opened 4 years ago Closed 3 years ago

Share dirListing.css across platforms and remove gtk ifdef

Categories

(Toolkit :: Themes, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: ntim, Assigned: aminomancer)

References

Details

(Whiteboard: [fidefe-2022-mr1-css-linting] )

Attachments

(1 file)

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.

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...

Blocks: 1659583
Summary: Share dirListing.css across platforms → Share dirListing.css across platforms and remove gtk ifdef
Whiteboard: [fidefe-2022-mr1-css-linting]

(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 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...

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

(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.

Flags: needinfo?(shmediaproductions)

Yes, I'm working on it now. Though I might need your help with, like, the right way to organize the directories and manifests

Flags: needinfo?(shmediaproductions)

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?

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.

Assignee: nobody → shmediaproductions
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6225ac6b20bd Share dirListing files across platforms. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: