Skip to content

Worth styling <code> inside anchors? #262

Description

@luca-arch

Hi!

I'm using an extra rule on top of simple.css, to avoid inconsistencies with colours when a tag <a> contains a tag <code>, e.g.:

a:has(> code) {
    color: var(--code);
}
<p>
    Use <a href="https://developer.mozilla.org/docs/Web/API/Window/localStorage"><code>window.localStorage</code></a>
    instead of writing cookies!
</p>

Result:

Image

vs

Image

Do you think this rule belongs to simple.css, rather than my style sheet?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions