Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Tweaking Bootstrap CSS buttons (all of them)

  • mrartist
  • mrartist
  • OFFLINE
  • Posts: 51
  • Thanks: 9
  • Karma: 1
11 years 6 months ago - 11 years 6 months ago #225441 by mrartist
Hi
I'm just checking if there's a simpler way to change the css for all the CB/GJ buttons in one go instead of each plugin one by one.

For instance, I managed to tweak the code for the profile tabs to look and appear in a better way by putting the changes in my site's template custom.css file, but then I found I still had to find the code for each additional CB/GJ plugin in it's components/com_comprofiler/plugin/user/... folder and then add or combine very similar code for the various extra buttons to be affected as well.

I wonder if I'm missing a trick that will override all the buttons look in one go or am I already going about it in the only way currently available?

Here are some visual samples of what I mean:

Before:


After:


A button I still need to change (in blue):


Another still to change:


One that I've tweaked already:



One other little problem I've had with the css is with a lack of background colour that does not seem to be applied to the CB/GJ content outer boxes. My main site template uses a slightly grey background similar to the greys used for the CB/GJ inner content box and the effect is that everything is grey and not, for example, like the sample page on the CB QS Pro Demo site ( cbqspro.cbdemosites.com/ ):

CB Demo site:


My site before tweaks: (NB I had already tweaked triangle on this shot)


After tweaking the cb outer box background area:


The problem I'm having with the backgrounds is that they too need to be repeatedly altered in the css depending on which plugin is displaying a box. If I don't make the change then it makes visually differentiating the actual content areas more difficult for the users.

It seems like there should be an area of the css that shares the code for the standard elements (e.g. buttons and boxes from the main CB bootstrap css file) rather than recreate a long css (and my long overrides) file for each and every cb/gj plugin. I suppose this would be an intention for the future, perhaps in combination with using LESS, or am I missing something easy and obvious that's there already?
Last edit: 11 years 6 months ago by mrartist. Reason: caption change

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225463 by krileon
Replied by krileon on topic Tweaking Bootstrap CSS buttons (all of them)
This will all be addressed with CB 2.0 where Twitter Bootstrap and CSS LESS will be a part of CBs core so you only need to make 1 change to affect all usages of it. For now each individual plugin needs to load it and have its own CSS for it. The reason I use selectors to target just that plugin is to avoid it from styling outside of it self (very bad if it did). For now your usage is correct.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum