Skip to content

Commit fe85aac

Browse files
committed
Add note to playground & update styles
1 parent 91dd2e6 commit fe85aac

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed

website/src/playground.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
<button class="run-button">Run</button>
1919
<button class="link-button">Link</button>
2020
</div>
21+
<div class="playground-notes">
22+
<span class="icon icon-md">
23+
<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>
24+
</span>
25+
<span>Use <code>console.log()</code> or <code>// =></code> for output</span>
26+
</div>
2127
</div>
2228

2329
<div class="sandbox-wrapper">

website/src/scss/includes/base.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ table {
162162
line-height: 0;
163163
width: 24px;
164164
height: 24px;
165+
166+
&.icon-md {
167+
width: 1rem;
168+
height: 1rem;
169+
}
165170
}
166171

167172
details {

website/src/scss/includes/themes.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $themes: (
1111
'font-success': dark.$green,
1212
'font-warning': dark.$orange,
1313
'font-error': dark.$red,
14+
'font-note': rgba(dark.$foreground, 0.7),
1415

1516
'button-color': dark.$bg,
1617
'button-color-hover': dark.$selection,
@@ -45,6 +46,7 @@ $themes: (
4546
'font-success': light.$green,
4647
'font-warning': light.$orange,
4748
'font-error': light.$red,
49+
'font-note': rgba(light.$foreground, 0.7),
4850

4951
'button-color': light.$foreground,
5052
'button-color-hover': light.$selection,

website/src/scss/parts/main.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ main {
8383
top: 1rem;
8484
align-self: flex-start;
8585

86-
padding: 0 0.5rem 1rem 0;
86+
padding: 0 0.5rem 150px 0;
8787

8888
font-size: 0.875rem;
8989
flex-basis: 20%;
@@ -93,10 +93,15 @@ main {
9393

9494
min-height: 100vh;
9595
min-height: 100dvh;
96+
max-height: 100vh;
97+
max-height: 100dvh;
9698
overflow-y: auto;
97-
scrollbar-width: none;
99+
overflow-x: hidden;
100+
scrollbar-width: thin;
101+
98102
@include themify($themes) {
99103
border-right: 1px solid themed('border-color-lighter');
104+
scrollbar-color: themed('background-light') themed('background-highlight');
100105
}
101106

102107
ul {

website/src/scss/parts/playground.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@
210210

211211
.playground-controls {
212212
display: flex;
213+
margin-bottom: 1rem;
214+
215+
@include media("min", "md") {
216+
margin-bottom: unset;
217+
}
213218

214219
button {
215220
margin-right: 1rem;
@@ -219,6 +224,28 @@
219224
}
220225
}
221226
}
227+
228+
.playground-notes {
229+
display: flex;
230+
align-items: center;
231+
gap: 0.5rem;
232+
font-size: 0.75rem;
233+
padding: 0 0.25rem;
234+
235+
@include themify($themes) {
236+
color: themed('font-note');
237+
}
238+
239+
@include media("min", "md") {
240+
margin-left: auto;
241+
}
242+
243+
svg {
244+
@include themify($themes) {
245+
fill: themed('font-note');
246+
}
247+
}
248+
}
222249
}
223250

224251
.copy-fallback {

0 commit comments

Comments
 (0)