nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.07k stars 3.92k forks source link

[RFC] Files mime icons theming #45579

Open skjnldsv opened 3 weeks ago

skjnldsv commented 3 weeks ago

Since we updated a few mime icons (doc, spreadsheets, pdf, archives...), we stepped away from the themed mime icons to use either org-provided colors (like red for pdf, blue for docx...) or fallback to the standard grey #969696

I am not sure we benefit from supporting the svg coloring feature the mime API provides. As of technical debt, I think we could deprecate and remove it.

cc @nextcloud/designers @nextcloud/server-frontend

Goal

The goal is to agree on a line to follow from here. If the design team is ok with this:

  1. if the mime is associated with a specific color, often provided by the org that created this file type, use it
  2. else, fallback to a default #969696 grey
  3. if folder, we always use the primary color

image

susnux commented 3 weeks ago

I agree here, but additionally I would suggest to move to an inline-svg approach. Because currently it is not really possible to get the correct primary color. The color depends on:

The first is "easy" to get on the backend, the second only with some new browser stuff not supported by e.g. Firefox.

So instead if we move to inline svgs instead of background images, we could simply use fill: var(--color-primary-element).

skjnldsv commented 3 weeks ago

We would never use the primary color. I suggest removing this entirely in the first post :)

susnux commented 3 weeks ago

We would never use the primary color. I suggest removing this entirely in the first post :)

...

if folder, we always use the primary color

So we still have the primary for the folder, which suffers this issue on the PHP api

skjnldsv commented 3 weeks ago

No the folder are inline svg right now, we migrated away from using the mime api :) I'm talking about every other file type but a directory :open_file_folder: