Skip to content

Commit 014e7e1

Browse files
Fix tab styling and add user_guide stub (#382)
* Add sphinx-design and copybutton PST extensions * Use tabs shortcode * Try 2 * Remove extensions * Fix tab background * Try 3 * Fix linter * Try 4 * Add tabs example with headings * Fix linter
1 parent c3a1d56 commit 014e7e1

4 files changed

Lines changed: 350 additions & 160 deletions

File tree

assets/theme-css/bulma.css

Lines changed: 0 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*! bulma.io v0.9.4 | MIT License | github.com/jgthms/bulma */
2-
.button,
32
.input,
43
.select select {
54
-moz-appearance: none;
@@ -20,24 +19,19 @@
2019
position: relative;
2120
vertical-align: top;
2221
}
23-
.button:active,
24-
.button:focus,
2522
.input:active,
2623
.input:focus,
27-
.is-active.button,
2824
.is-active.input,
2925
.select select.is-active,
3026
.select select:active,
3127
.select select:focus {
3228
outline: 0;
3329
}
34-
.button[disabled],
3530
.input[disabled],
3631
.select select[disabled] {
3732
cursor: not-allowed;
3833
}
3934

40-
.button,
4135
.file,
4236
.navbar-link:not(.is-arrowless)::after,
4337
.select:not(.is-multiple):not(.is-loading)::after {
@@ -149,7 +143,6 @@
149143
ul {
150144
list-style: none;
151145
}
152-
button,
153146
input,
154147
select {
155148
margin: 0;
@@ -256,120 +249,6 @@ a.box:active {
256249
inset 0 1px 2px rgba(10, 10, 10, 0.2),
257250
0 0 0 1px #485fc7;
258251
}
259-
.button {
260-
background-color: #fff;
261-
border-color: #dbdbdb;
262-
border-width: 1px;
263-
color: #363636;
264-
cursor: pointer;
265-
justify-content: center;
266-
padding-bottom: calc(0.5em - 1px);
267-
padding-left: 1em;
268-
padding-right: 1em;
269-
padding-top: calc(0.5em - 1px);
270-
text-align: center;
271-
white-space: nowrap;
272-
}
273-
.button strong {
274-
color: inherit;
275-
}
276-
.button .icon {
277-
height: 1.5em;
278-
width: 1.5em;
279-
}
280-
.button .icon:first-child:not(:last-child) {
281-
margin-left: calc(-0.5em - 1px);
282-
margin-right: 0.25em;
283-
}
284-
.button .icon:last-child:not(:first-child) {
285-
margin-left: 0.25em;
286-
margin-right: calc(-0.5em - 1px);
287-
}
288-
.button .icon:first-child:last-child {
289-
margin-left: calc(-0.5em - 1px);
290-
margin-right: calc(-0.5em - 1px);
291-
}
292-
293-
.button:hover {
294-
border-color: #b5b5b5;
295-
color: #363636;
296-
}
297-
298-
.button:focus {
299-
border-color: #485fc7;
300-
color: #363636;
301-
}
302-
303-
.button:focus:not(:active) {
304-
box-shadow: 0 0 0 0.125em rgba(72, 95, 199, 0.25);
305-
}
306-
.button.is-active,
307-
.button:active {
308-
border-color: #4a4a4a;
309-
color: #363636;
310-
}
311-
.button.is-light {
312-
background-color: #f5f5f5;
313-
border-color: transparent;
314-
color: rgba(0, 0, 0, 0.7);
315-
}
316-
317-
.button.is-light:hover {
318-
background-color: #eee;
319-
border-color: transparent;
320-
color: rgba(0, 0, 0, 0.7);
321-
}
322-
323-
.button.is-light:focus {
324-
border-color: transparent;
325-
color: rgba(0, 0, 0, 0.7);
326-
}
327-
328-
.button.is-light:focus:not(:active) {
329-
box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25);
330-
}
331-
.button.is-light.is-active,
332-
.button.is-light:active {
333-
background-color: #e8e8e8;
334-
border-color: transparent;
335-
color: rgba(0, 0, 0, 0.7);
336-
}
337-
.button.is-light[disabled] {
338-
background-color: #f5f5f5;
339-
border-color: #f5f5f5;
340-
box-shadow: none;
341-
}
342-
.button[disabled] {
343-
background-color: #fff;
344-
border-color: #dbdbdb;
345-
box-shadow: none;
346-
opacity: 0.5;
347-
}
348-
.button.is-static {
349-
background-color: #f5f5f5;
350-
border-color: #dbdbdb;
351-
color: #7a7a7a;
352-
box-shadow: none;
353-
pointer-events: none;
354-
}
355-
.buttons {
356-
align-items: center;
357-
display: flex;
358-
flex-wrap: wrap;
359-
justify-content: flex-start;
360-
}
361-
.buttons .button {
362-
margin-bottom: 0.5rem;
363-
}
364-
.buttons .button:not(:last-child):not(.is-fullwidth) {
365-
margin-right: 0.5rem;
366-
}
367-
.buttons:last-child {
368-
margin-bottom: -0.5rem;
369-
}
370-
.buttons:not(:last-child) {
371-
margin-bottom: 1rem;
372-
}
373252
.container {
374253
flex-grow: 1;
375254
margin: 0 auto;

assets/theme-css/fresh.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@
141141
section:focus {
142142
outline: none !important;
143143
}
144-
button:focus,
145-
button:active {
146-
outline: none;
147-
}
144+
148145
#status {
149146
width: 200px;
150147
height: 200px;

assets/theme-css/tabs.css

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,43 @@
1111
min-width: 100%;
1212
}
1313

14-
[role="tab"],
15-
[role="tab"]:focus,
16-
[role="tab"]:hover {
17-
display: inline-block;
18-
position: relative;
19-
z-index: 2;
20-
top: 1px;
21-
margin: 0;
22-
margin-top: 4px;
14+
[role="tab"] {
2315
padding: 2px 2px 4px;
24-
border: 1px solid hsl(219deg 1% 72%);
25-
border-bottom: 1px solid hsl(219deg 1% 72%);
26-
border-radius: 5px 5px 0 0;
16+
background-color: var(--pst-color-background);
17+
border-color: transparent transparent var(--pst-color-primary);
18+
color: var(--pst-color-text);
2719
outline: none;
2820
font-weight: bold;
2921
max-width: 22%;
3022
overflow: hidden;
3123
text-align: left;
3224
cursor: pointer;
25+
font-size: 1rem;
26+
}
27+
28+
[role="tab"]:hover {
29+
color: var(--pst-color-secondary);
30+
border-color: var(--pst-color-secondary) transparent
31+
var(--pst-color-secondary);
3332
}
3433

3534
[role="tab"][aria-selected="true"] {
36-
padding: 2px 2px 4px;
37-
margin-top: 0;
38-
border-width: 1px;
39-
border-top-width: 6px;
40-
border-top-color: rgb(36 116 214);
41-
border-bottom-color: hsl(220deg 43% 99%);
42-
background: hsl(220deg 43% 99%);
35+
border-color: transparent transparent var(--pst-color-primary);
36+
color: var(--pst-color-primary);
37+
}
38+
39+
[role="tab"][aria-selected="true"]:hover {
40+
border-color: var(--pst-color-secondary) transparent
41+
var(--pst-color-secondary);
42+
color: var(--pst-color-secondary);
4343
}
4444

4545
[role="tab"][aria-selected="false"] {
46-
padding: 2px 2px 4px;
47-
border-bottom: 1px solid hsl(219deg 1% 72%);
46+
border-bottom: 0rem solid;
47+
}
48+
49+
[role="tab"][aria-selected="false"]:hover {
50+
border-bottom: 0.0625rem solid var(--pst-color-secondary);
4851
}
4952

5053
[role="tab"] span.focus {
@@ -53,23 +56,12 @@
5356
padding: 4px 6px;
5457
}
5558

56-
/* This makes the tab bounce around */
57-
/* [role="tab"]:hover span.focus, */
58-
/* [role="tab"]:focus span.focus, */
59-
/* [role="tab"]:active span.focus { */
60-
/* padding: 2px 2px 4px; */
61-
/* border: 1px solid rgb(36 116 214); */
62-
/* border-radius: 3px; */
63-
/* } */
64-
6559
[role="tabpanel"] {
66-
padding: 1rem;
67-
border: 1px solid hsl(219deg 1% 72%);
68-
border-radius: 0 5px 5px;
69-
min-height: 10em;
60+
box-shadow:
61+
0 -0.0625rem var(--pst-color-text-muted),
62+
0 0.0625rem var(--pst-color-text-muted);
7063
width: 100%;
7164
overflow: auto;
72-
background: var(--pst-color-on-background);
7365
}
7466

7567
[role="tabpanel"].is-hidden {

0 commit comments

Comments
 (0)