Select to view content in your preferred language

Custom font color suddenly not working

418
6
Jump to solution
08-14-2024 10:22 AM
Labels (1)
MaryGraceMcClellan
Regular Contributor

I had an accordion item custom coded to have white text, but today out of nowhere the text turned grey. It isn't only the accordion items that this happened to - there are several other elements where the text is displaying gray rather than white and I'm not sure what could have caused it. Has anyone run into a similar issue? 

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
howardro
Emerging Contributor

Try the following:

<calcite-accordion appearance="transparent" icon-position="start" scale="l" selection-mode="single" icon-type="chevron" calcite-hydrated="">
<calcite-accordion-item heading="Quarterly Updates" style="background-color:#8f2f31; color:#ffffff; border-bottom:1px solid #a6a6a6; --calcite-color-text-1:#fff; ;--calcite-color-text-2:#fff; --calcite-color-text-3:#fff;" calcite-hydrated="">
            <div class="panel-body" style="background-color:#fff; color:#4c4c4c;">
              <a href="https://westtnplanning.maps.arcgis.com/sharing/rest/content/items/87d74f2153924bde8555bd6ddf756bb5/data" target="_blank">2024 May Update</a></div>
    </calcite-accordion-item>
</calcite-accordion>

View solution in original post

6 Replies
RohitSharma-1
Esri Contributor

Hello @MaryGraceMcClellan - Could you please share the following information to help us replicate this issue:

  • Steps to reproduce this
  • URL (where this is being noticed)
  • Snapshots (if possible)
RS
0 Kudos
MaryGraceMcClellan
Regular Contributor

Hi @RohitSharma-1 - the URL is here: https://westtnplanning.tn.gov/

It seems to be happening anywhere we have accordion items: 

 

1. On the Project Information page (https://westtnplanning.tn.gov/pages/project-info😞 

MaryGraceMcClellan_0-1723666032809.png

 

2. Planning documents page (https://westtnplanning.tn.gov/pages/planning-documents😞

MaryGraceMcClellan_1-1723666101839.png

 

 

There are other places this is happening, but here is the basic CSS we've been relying on the preserve the accordion formatting in #2. I don't see anything that has changed in the code: 

  <style>
    body * {
      --calcite-ui-text-1: #ffffff;
      --calcite-ui-text-2: #ffffff;
      --calcite-ui-text-3: #ffffff;
       .accordionButton {
    margin: 0px auto;
 }

  </style>

<div class="col-xs-15" style="width:70%">
          <calcite-accordion appearance="transparent" icon-position="start" scale="l" selection-mode="single" icon-type="chevron" calcite-hydrated="">
            <calcite-accordion-item heading="Quarterly Updates" style="background-color:#8f2f31; color:#ffffff; border-bottom:1px solid #a6a6a6" calcite-hydrated="">
            <div class="panel-body" style="background-color:#fff; color:#4c4c4c;">
              <a href="https://westtnplanning.maps.arcgis.com/sharing/rest/content/items/87d74f2153924bde8555bd6ddf756bb5/data" target="_blank">2024 May Update</a></div>
          </calcite-accordion-item>
        </calcite-accordion>
      </div>

 

 

 

 

 

 

 

0 Kudos
howardro
Emerging Contributor

Try the following:

<calcite-accordion appearance="transparent" icon-position="start" scale="l" selection-mode="single" icon-type="chevron" calcite-hydrated="">
<calcite-accordion-item heading="Quarterly Updates" style="background-color:#8f2f31; color:#ffffff; border-bottom:1px solid #a6a6a6; --calcite-color-text-1:#fff; ;--calcite-color-text-2:#fff; --calcite-color-text-3:#fff;" calcite-hydrated="">
            <div class="panel-body" style="background-color:#fff; color:#4c4c4c;">
              <a href="https://westtnplanning.maps.arcgis.com/sharing/rest/content/items/87d74f2153924bde8555bd6ddf756bb5/data" target="_blank">2024 May Update</a></div>
    </calcite-accordion-item>
</calcite-accordion>
MaryGraceMcClellan
Regular Contributor

That worked perfectly, thank you!! 

0 Kudos
RohitSharma-1
Esri Contributor

@MaryGraceMcClellan - Do you have any additional questions?

RS
0 Kudos
MaryGraceMcClellan
Regular Contributor

@RohitSharma-1 I don't, thank you for checking in! 

0 Kudos