Add more classes to code to better support custom CSS

Hidden Closed

Custom CSS is useful for generic styling, but it is rather restricted by the fact that it is not easy to target lots of elements. It would be useful to have a "logged-in" class in the body to be able to target logged in/out states. It would also be useful to have the page/URL class (e.g. page-user-profile, page-tabs-feature-requests, page-feature-featureID etc)

Ben

2 years ago

Activity
Ruben changed status to Closed

11 months ago

Ruben

Hi Ben, thanks for your post. Not sure what you exactly want to do with this. Can you show some examples of items you want to target?

1    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
Ben

Your custom CSS allows you to visually customise your pages. It generally works well, but some things couldn't be targeted individually.

One example would be to have different coloured/styled boxes on my "Roadmap" and "Feature Requests" tabs. At the moment this cannot be done. If a class was added to the body indicating the page, this would be possible.

0    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
Ben

A few more examples:

Adding ".card-votes" to the voting box in the sidebar would allow me to hide or style this specific box.

Adding ".views-count" to the views count would allow me to hide it or make the first letter uppercase, as I wanted to do.

Adding some way to target a specific badge/pill. The pill on the changelog's pill wrapper has a ".pr3", which doesn't look right. I could have just fixed this with my own CSS if there was a specific selector.

0    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
Ruben

@Ben: Thanks for your comment.
Can you share which items you want to have?
Or are the examples all you need?

0    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
One vote
Categories
Feature