Discourse Button Styles

Hey @awesomerobot looks cool! Related to this I have some quick feedback based on my experience adding custom button styles to our theme at https://forum.troygrady.com/

We added rounded corners on all our buttons. And along with this, we changed some spacing / grouping of the buttons. For example our main homepage buttons look like this:

55%20PM

(NB: we think categories makes sense separate since it’s more a different view vs. a way of filtering the topics list.)

This looks good for the most part. Except when there are no “new” or “unread”, it looks like this:

00%20PM

We got the first button in the group here using:

.nav-pills>li:first-child

But tricky getting the last one in that group since the # of buttons changes. If there were a way to have the /new and /unread buttons removed from the DOM rather than hidden in such cases, then I could target these more consistently e.g. target /top using:

.nav-pills>li:nth-last-child(2)

Pretty minor but figured this was as good a spot as any to chime in w/ some CSS button detail!

2 Likes