Change color of File Tags

46 views
Skip to first unread message

Christian Bischof

unread,
May 8, 2024, 8:10:04 AM5/8/24
to Dataverse Users Community
Hi,

is there a way to change the color of the file tags? At best for a single tag category.
The tabular data tags have another color.
Is there a way to override the default list of the tabular categories? Similar as for the file tags https://guides.dataverse.org/en/5.12.1/installation/config.html?highlight=filecategories#filecategories

Best
Christian
grafik.png

Sherry Lake

unread,
May 8, 2024, 9:29:02 AM5/8/24
to dataverse...@googlegroups.com
Hello Christian,

There is an API call to edit the tabular categories:

You can also change the color of tags through CSS styling, but I think the color change will go on all the file tags or all the tabular tags, I don't think you can change just one filetag category color.
Here's the default styling: https://guides.dataverse.org/en/latest/style/index.html

Create a file custom-stylesheet.css file here: /var/www/dataverse/branding
and add these lines to change the color of the file tags:

            .file-tags-block .label-default {
                background-color: #5bc0de;
            }

More about custom stylesheet: 
Even though the stylesheet file is described in relation to a custom home page, you can use that stylesheet to customize other parts of your dataverse repo site.

--
Sherry Lake
UVA Dataverse

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/ec7bf4a0-7599-4f31-8869-614f2aeaf060n%40googlegroups.com.

Philip Durbin

unread,
May 8, 2024, 9:49:51 AM5/8/24
to dataverse...@googlegroups.com
Like Sherry said, custom CSS will help with the colors.

The tabular data tags are hard-coded and I think they may be inspired by a standard such as DDI.

I'm glad you found the docs on how to show or hide regular (non-tabular) tags. If you want similar functionality for tabular data tags, please feel free to create a GitHub issue.

Thanks,

Phil



--

Christian Bischof

unread,
May 10, 2024, 9:24:34 AM5/10/24
to Dataverse Users Community
ok, thank you both.
I created 2 new issues (custom colors for file tags, custom tabular tags) at GitHub.
Best Christian

Philip Durbin

unread,
May 10, 2024, 1:58:47 PM5/10/24
to dataverse...@googlegroups.com
Thanks! I'll just add links below in case people want to subscribe or thumbs up them:

- Custom tabular ingest file tags: https://github.com/IQSS/dataverse/issues/10553


Christian Bischof

unread,
May 13, 2024, 8:58:43 AM5/13/24
to Dataverse Users Community
another question concerning CSS, how can I change the color of the text "Datasets will default ...", what is the correct element?
Thanks a lot!

grafik_720.png
Reply all
Reply to author
Forward
0 new messages