Skip to content

Commit dda8682

Browse files
committed
Tweak CSS so language chooser is more obviously a button
1 parent 3b10a5a commit dda8682

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

docs/get-started/_language-chooser.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
You can work through this tutorial using R or Python code examples.
66
Select your preferred language:
77

8-
::: {.panel-tabset group="language"}
8+
::: {#language-chooser .panel-tabset group="language"}
99

1010
## R
1111

12+
You've selected to see examples in R. You can toggle to Python whenever you like throughout the guide.
13+
1214
## Python
1315

16+
You've selected to see examples in Python. You can toggle to R whenever you like throughout the guide.
17+
1418
:::
1519

1620
:::

docs/get-started/positron.css

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
div[data-group="language"] .nav-tabs {
2-
display: flex;
3-
justify-content: flex-end;
4-
padding-right: 0;
5-
}
6-
7-
.callout div[data-group="language"] .nav-tabs {
8-
display: flex;
9-
justify-content: flex-start;
10-
}
1+
/* Styling for all language chooser tabsets */
112

123
div[data-group="language"] .tab-content {
134
padding: 0;
@@ -16,8 +7,34 @@ div[data-group="language"] .tab-content {
167
border: none;
178
}
189

10+
/* Styling for the top language chooser tabset */
11+
12+
div[data-group="language"]#language-chooser .nav-tabs {
13+
display: flex;
14+
justify-content: flex-start;
15+
}
16+
17+
div[data-group="language"]#language-chooser .nav-tabs .nav-link.active,
18+
div[data-group="language"]#language-chooser .nav-tabs .nav-item.show .nav-link {
19+
background-color: rgb(80,146,221);
20+
color: white;
21+
}
22+
23+
div[data-group="language"]#language-chooser .nav-tabs .nav-link:hover {
24+
border-color: rgb(80,146,221);
25+
}
26+
27+
28+
/* Styling for all but the top language chooser tabset */
29+
30+
div[data-group="language"]:not(#language-chooser) .nav-tabs {
31+
display: flex;
32+
justify-content: flex-end;
33+
padding-right: 0;
34+
}
35+
1936

20-
div[data-group="language"] .nav-tabs .nav-link {
37+
div[data-group="language"]:not(#language-chooser) .nav-tabs .nav-link {
2138
border: none;
2239
margin-right: 0;
2340
margin-top: 0;
@@ -27,13 +44,13 @@ div[data-group="language"] .nav-tabs .nav-link {
2744
}
2845

2946

30-
div[data-group="language"] .nav-tabs .nav-link.active,
31-
div[data-group="language"] .nav-tabs .nav-item.show .nav-link {
47+
div[data-group="language"]:not(#language-chooser) .nav-tabs .nav-link.active,
48+
div[data-group="language"]:not(#language-chooser) .nav-tabs .nav-item.show .nav-link {
3249
border-bottom: solid;
3350
border-width: 2px;
3451
}
3552

36-
div[data-group="language"] .nav-tabs .nav-link:hover {
53+
div[data-group="language"]:not(#language-chooser) .nav-tabs .nav-link:hover {
3754
border-bottom: solid;
3855
border-color: rgb(80,146,221);
3956
border-width: 2px;

0 commit comments

Comments
 (0)