• Resolved akanelittle

    (@akanelittle)


    Hello! I need help with changing the color of the underline for links in paragraph blocks. I want to change the color from #EC5038 to #1E6F78. I’d also like to have the color change to #4A423B with a hover.

    To change the default link decoration color, I’ve tried using this additional CSS for paragraph blocks with no luck:

    a:link {text-decoration: #1E6F78 !important}

    • This topic was modified 4 days, 10 hours ago by akanelittle.
    • This topic was modified 4 days, 10 hours ago by akanelittle.
    • This topic was modified 4 days, 10 hours ago by akanelittle.
    • This topic was modified 4 days, 10 hours ago by akanelittle.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author philhoyt

    (@philhoyt)

    Hi, thanks for the details. The underline colour on links is set by the theme’s stylesheet rather than by the Styles panel, so it does not follow the palette or the link colour setting. You can override it with a few lines of CSS.

    In the Site Editor, open Styles, click the three-dot menu at the top of the Styles panel and choose Additional CSS. Paste this and save:

    body a {
    text-decoration-color: var(--wp--preset--color--tertiary);
    }

    body a:hover {
    text-decoration-color: var(--wp--preset--color--contrast-dark);
    }


    Those two variables are Loam’s teal (#1E6F78) and dark brown (#4A423B), so the underline will keep following your palette if you change it later. You can also paste the hex values directly instead.

    One more thing: there is already a rule in your Additional CSS that reads :root :where(pa:link){text-decoration: none !important}. That selector has a typo and would remove the underline entirely rather than recolour it, so delete it before adding the above.

    I am also pushing a small update to the theme that will make overwriting these styles easier in the future.

    Theme Author philhoyt

    (@philhoyt)

    If you want to overwrite the quote block use the following:

    .wp-block-quote {
    border-left-color: var(--wp--preset--color--tertiary);
    }
    Theme Author philhoyt

    (@philhoyt)

    If you would like the teal everywhere the orange appears, the quicker route is to change the palette itself: open Styles, then Colors, then Palette, and set Primary to #1E6F78. That recolours the link underline, the quote border, buttons and the accent band in one go. Buttons and the accent band use dark text, which is harder to read on teal, so after that also open Styles, then Blocks, then Button and set its text colour to Base.

    If you only want the underline and the quote border changed, use the CSS above instead and leave the palette as it is.

    Thread Starter akanelittle

    (@akanelittle)

    Wow, thanks so much!! This is incredibly helpful!

    Theme Author philhoyt

    (@philhoyt)

    Noticed the teal had not been applied yet, so I made some screenshots to help out.

    1. Styles panel. In the Site Editor open Styles and click Colors.
    2. Colors. Click Edit palette.
    3. Palette. Under Theme, click the third swatch, Primary.
    4. Colour picker. The hex field shows the current orange, EC5038.
    5. Teal entered. Replace it with 1E6F78. The swatch and the preview update straight away.
    6. Save. Click the Review button at the bottom left and save the change.
    7. Before. The quote border and link underlines on the Reiki page today.
    8. After. The same section once Primary is teal.
Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.