Accordian CSS code stopped working tonight

Krothos
Krothos

I'm using the following CSS to change the coloring of my accordions:

/* Accordion - Change Color */

.ui-accordion-header { background-color: transparent ; color: #681007 !important ; font-weight: bold !important ; font-size: 18px !important ; border-color: #472d12 }

.ui-accordion-content { background-color: transparent }

But they are no longer transparent when I was on the site earlier this evening. Did something change with how CSS works during the recent backend updates?

image

 

Comments

  • Abersade
    Abersade
    Posts: 417

    Is that a paste of your code? I ask because you are missing a few of your semicolons.

    Provided the selectors are still correct it should read:


    /* Accordion - Change Color */

    .ui-accordion-header {background-color: transparent; color: #681007 !important; font-weight: bold !important; font-size: 18px !important; border-color: #472d12;}

    .ui-accordion-content {background-color: transparent;}

     

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    GM of Stream of Kairos

    Need CSS Help? It may be covered here: Abersade's CSS Hub

  • Krothos
    Krothos
    Posts: 230

    Thanks, Abersade. I compared your code to my original code. It appears you only added the semi-colons to the end of each line (before the closing curly bracket). My understanding, and I can be completely wrong here, was semi-colons are used to separate conditions, and the this last semi-colon was unnecessary because there is no further conditions.

    In any event, I replace my code with your code (copy/paste from above into my Settings | Custom CSS). This did not help. :(

     

  • Abersade
    Abersade
    Posts: 417

    I didn't know that. Interesting. At any rate I'll look into this a bit further.

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    GM of Stream of Kairos

    Need CSS Help? It may be covered here: Abersade's CSS Hub

  • Abersade
    Abersade
    Posts: 417 edited March 2019

    .ui-accordion-content {background: none; border: none;}

     

    If you need to specify other styling for the background the .ui-widget selector worked for me.
    Post edited by Abersade on

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    GM of Stream of Kairos

    Need CSS Help? It may be covered here: Abersade's CSS Hub

  • Krothos
    Krothos
    Posts: 230 edited March 2019

    Again, thank you, Abersade, but the additional code provided didn't not help. :(

     

    Post edited by Krothos on
  • Abersade
    Abersade
    Posts: 417

    Odd, when I isolated the code above it worked as expected. Is there something else that could be interfering?

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    GM of Stream of Kairos

    Need CSS Help? It may be covered here: Abersade's CSS Hub

  • Krothos
    Krothos
    Posts: 230

    Thank you for the lead... it helped to figured it out! The problem was the "background" command. I was using. When I isolated the code, refreshed the page, for some reason the "background-color" looked wrong to me. So changing {background-color: transparency;} to {background: transparency;} worked!

    So here is the new code I'm using.



    /* Accordion - Change Color */
    .ui-accordion-header {background:transparent; color:#681007 !important; font-weight:bold !important; font-size:18px !important; border-color:#472d12;}
    .ui-accordion-content {background:transparent;}

    Thanks for the assist. It's still working after I loaded the rest of the other code.

     

  • Abersade
    Abersade
    Posts: 417

    Yeah, that's the one drawback of using my testbed site for well, testing. Pristine environment pretty much every time which doesn't particularly help me identify when other code overlaps and causes issues.

    Ultimately what matters to me is that your code works so I'm glad I could help!

    GM of Rise of the Durnskald: Wrath of the Fallen Goddess - February 2016 CotM

    GM of Core: The Ashes of Alcarna - April 2020 CotM

    GM of Stream of Kairos

    Need CSS Help? It may be covered here: Abersade's CSS Hub

Sign In or Register to comment.

March 2024
Wrath of the Highborn

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions