Skip to content

Commit

Permalink
Merge pull request #316 from jonathanhefner/css-feature-detect-has
Browse files Browse the repository at this point in the history
Use `@supports` for `:has()` feature detection
  • Loading branch information
jonathanhefner authored Oct 5, 2023
2 parents 97b8f31 + 51df1b9 commit ef22e49
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/rdoc/generator/template/rails/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ a:has(> code):not(:has(> :not(code))) {
}

/* TODO: Remove this hack when Firefox supports `:has()` */
a code {
text-decoration: underline var(--body-bg);
@supports not selector(:has(*)) {
a code {
text-decoration: underline var(--body-bg);
}
}

.external-link {
Expand Down Expand Up @@ -713,8 +715,10 @@ html {
}

/* TODO: Remove this hack when Firefox supports `:has()` */
.description a code {
text-decoration: underline var(--code-bg);
@supports not selector(:has(*)) {
.description a code {
text-decoration: underline var(--code-bg);
}
}

@media (hover: hover) {
Expand Down

0 comments on commit ef22e49

Please sign in to comment.