New sidebar custom CSS

Continuing the discussion from Try out the new sidebar and notification menus!:

@Canapin Please forgive the ignorant question, it’s been awhile since I’ve been here on meta and I’ve not made many CSS changes to my instance in the past couple of years.

What CSS did you use to customize the unread/new/draft in the sidebar? I’ve been searching and not sure what to use.

Thanks much in advance.

1 Like

That’s expected since I didn’t make any changes to my sidebar. :smile:
Other users had similar displays with unread numbers, see Try out the new sidebar and notification menus! - #240 by MarcP

I notice there are now dots instead.

So I guess the sidebar code was changed at some point during the development.

2 Likes

Yeah, it changed here :slightly_smiling_face:

3 Likes

Interesting. In one of the split off topics, they point out that the dots or unread count can now be set by users. It can be found under Preferences>Sidebar>Navigation. I wish it could be set as default by admin. Users on my instance are not tech savvy and would never find that setting or know it exists.

Both here on meta.discourse and on my instance it looks like the following for me, in grey text.

I think they are much easier to see with some other color text.

1 Like

Hello,

I think create a topic where you introduce the new sidebar could be a good solution for this. You can easily navigate your users to the correct place with a link, using the /my/ parameter. :slightly_smiling_face:

yoursite.com/my/preferences/sidebar

Like this: https://meta.discourse.org/my/preferences/sidebar


Yes, it’s grayed out to make it look less like a link. This is possible to change by adding some CSS to a component. :slightly_smiling_face:

For example:

Common > CSS

// Sidebar new/unread color

.sidebar-section-link-wrapper {
  .sidebar-section-link {
    .sidebar-section-link-content-badge {
      color: var(--tertiary);
    }
  }
  // don't change the review link color
  .sidebar-section-link-review {
    .sidebar-section-link-content-badge {
      color: var(--danger);
    }
  }
}
2 Likes

Lovely, thank you. Not sure why I didn’t think of that. :person_facepalming:t5:

Brilliant! Exactly what I was looking for!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.