Skip to content

Commit 4a5429d

Browse files
committed
Set the Playground tab apart in the header
The tab is white on the theme's blue, like the Format button and Get started on Home, so the page is easy to find from any other. It turns to the accent colour on hover and focus. The selector matches the end of the link, since the tab links are relative to the page.
1 parent 8ccd403 commit 4a5429d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎docs/stylesheets/playground.css‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
/* The Playground page, docs/playground/index.md: the code and the result side by side, stacked on a narrow screen.
22
Colours and fonts are the theme's, so both palettes work. */
33

4+
/* The Playground tab in the header stands out on every page: white on the theme's blue, like the Format button.
5+
Its href is relative, ./playground/ or ../playground/, so the selector matches the end. */
6+
.md-tabs__link[href$="playground/"] {
7+
margin-top: 0.5rem;
8+
padding: 0.25rem 0.6rem;
9+
border-radius: 0.2rem;
10+
background-color: var(--md-primary-fg-color);
11+
color: var(--md-primary-bg-color);
12+
opacity: 1;
13+
}
14+
15+
.md-tabs__link[href$="playground/"]:is(:hover, :focus) {
16+
background-color: var(--md-accent-fg-color);
17+
color: var(--md-accent-bg-color);
18+
}
19+
420
.ojf-playground {
521
display: grid;
622
grid-template-columns: 1fr;

0 commit comments

Comments
 (0)