Danbooru

Custom CSS Thread

Posted under General

Zurreak said:

Does anyone know how to change the color of the border that appears around the post listing when in a specific viewing mode?

Just change the colors as desired.

https://www.w3schools.com/html/html_colors.asp

body {
    background-color: #fff;
}
body.mode-edit {
    background-color: #5c5;
}
body.mode-tag-script {
    background-color: #d6d;
}
body.mode-add-fav {
    background-color: #ffa;
}
body.mode-remove-fav {
    background-color: #ffa;
}
body.mode-vote-down {
    background-color: #faa;
}
body.mode-vote-up {
    background-color: #afa;
}
body.mode-lock-rating {
    background-color: #aa3;
}
body.mode-lock-note {
    background-color: #3aa;
}

Hello guys, do you know of any CSS or script to make images fit screen by height instead width by default?

One more thing... you know if it's possible to give a keyboard shortcut to Download button?

Thx.

rrroi said:

Hello guys, do you know of any CSS or script to make images fit screen by height instead width by default?

One more thing... you know if it's possible to give a keyboard shortcut to Download button?

Thx.

The following should work:

#c-posts #a-show #image {
    height: 100vh;
    width: auto;
}

BrokenEagle98 said:

The following should work:

#c-posts #a-show #image {
    height: 100vh;
    width: auto;
}

changing the 'parameter 100' this worked perfect, thanks!
I guess I should ask for the download shortcut in another thread x)

Does anyone know how to change that yellow background color (#ffffcc) when you click the date when a post was made? I use a dark theme and it really sticks out badly with it.

evazion said:

Danbooru has a native dark theme if you weren't aware. You can enable it in your account settings. Otherwise it's this:

:root {
  --target-background: grey;
}

Damn, I've had no idea about this honestly, I looked for it before but since there was nothing I was just using some random dark theme I've found on pastebin which I've modified to not look so terrible. I see that on GitHub this was added recently, it looks great too. Thanks a lot for letting me know and also thanks for adding the theme as well.

Forum beautification for those who are not hard of seeing:

tr[data-is-read=false] > td.title-column {
	font-weight: bold;
}

td.title-column > a[href="/forum_topics?search%5Bis_read%5D=false"] {
	display: none;
}

CSS critique is welcome. In particular, if you know a neater way to select the "a" tags around the "NEW" labels, then please tell me about it.

Edit: Now bolds only the topic title.

Updated

@Flopsy said:

CSS critique is welcome. In particular, if you know a neater way to select the "a" tags around the "NEW" labels, then please tell me about it.

One of the site developers recommended the following:
div#c-forum-topics #a-index tr span.new {
display: none;
}