Pure Theme CSS help

I am trying to change the color of my blog’s title I thought that by going into the CSS settings and changing this

body > header h1 {
    color: #000000a6;
}

would do the trick but, so far no luck. Unless this is the wrong thing to chnage.

You’re very close, but the title is actually a link (‘a’ element) inside a heading (‘h1’ element). One CSS rule that would do the trick is the following:

body > header h1 a {
  color: white; /* or another color */
}

Ah!! gotcha!!!

One thing I didn’t think about, though. If I change it to a dark color, it won’t show in dark mode.

Do you think adding to the CSS something like

@media (prefers-color-scheme: dark) {
          body > header h1 a {
                color: white important!; /* or another color */
}

would do the trick?

actually that did lol

Thank you again

1 Like

with !important, not important!

You shouldn’t need important, just make sure the media query comes after the original selector in your CSS file.