|
1 | | -/* The Playground page, docs/playground/index.md: the code and the result side by side, stacked on a narrow screen. |
2 | | - Colours and fonts are the theme's, so both palettes work. */ |
| 1 | +/* The Playground page, docs/playground/index.md: the code, the Format bar and the result, one under another, each the |
| 2 | + width of the page. Colours and fonts are the theme's, so both palettes work. */ |
3 | 3 |
|
4 | 4 | /* The Playground tab in the header stands out on every page: white on the theme's blue, like the Format button. |
5 | 5 | Its href is relative, ./playground/ or ../playground/, so the selector matches the end. */ |
|
23 | 23 | gap: 1rem; |
24 | 24 | } |
25 | 25 |
|
26 | | -/* The theme's own breakpoint for a wide screen. */ |
27 | | -@media screen and (min-width: 60em) { |
28 | | - .ojf-playground { |
29 | | - grid-template-columns: 1fr 1fr; |
30 | | - } |
31 | | -} |
32 | | - |
33 | 26 | .ojf-playground__pane { |
34 | 27 | position: relative; |
35 | 28 | display: flex; |
|
45 | 38 | .ojf-playground textarea { |
46 | 39 | box-sizing: border-box; |
47 | 40 | width: 100%; |
48 | | - height: 45vh; |
49 | | - min-height: 16rem; |
| 41 | + /* A strip, low and as wide as the page, which a long line of the formatter's 120 columns fits. Either box can be |
| 42 | + pulled taller. */ |
| 43 | + height: min(30vh, 20rem); |
| 44 | + min-height: 10rem; |
50 | 45 | padding: 0.8em 1.2em; |
51 | 46 | border: 1px solid var(--md-default-fg-color--lightest); |
52 | 47 | border-radius: 0.1rem; |
53 | 48 | background-color: var(--md-code-bg-color); |
54 | 49 | color: var(--md-code-fg-color); |
55 | 50 | font-family: var(--md-code-font-family); |
56 | | - font-size: 0.75rem; |
| 51 | + font-size: 0.65rem; |
57 | 52 | line-height: 1.4; |
58 | 53 | tab-size: 4; |
59 | 54 | white-space: pre; |
60 | 55 | overflow: auto; |
61 | | - resize: none; |
62 | | -} |
63 | | - |
64 | | -/* Side by side, the panes can take most of the window; stacked, two of them have to fit. */ |
65 | | -@media screen and (min-width: 60em) { |
66 | | - .ojf-playground textarea { |
67 | | - height: min(70vh, 40rem); |
68 | | - } |
| 56 | + resize: vertical; |
69 | 57 | } |
70 | 58 |
|
71 | 59 | .ojf-playground textarea:focus { |
|
91 | 79 | } |
92 | 80 |
|
93 | 81 | .ojf-playground__bar { |
94 | | - grid-column: 1 / -1; |
95 | 82 | display: flex; |
96 | 83 | flex-wrap: wrap; |
97 | 84 | align-items: center; |
|
0 commit comments