Skip to content

Commit

Permalink
Update demo style to match theme
Browse files Browse the repository at this point in the history
  • Loading branch information
codesue committed Dec 17, 2023
1 parent e839106 commit 53cabfe
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
11 changes: 0 additions & 11 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ Try it out! Enter some Python code in the text area below and click the
<code>Run</code> button to execute it. You can also use <kbd>Shift</kbd> +
<kbd>Enter</kbd> to run the code.

<style>
io-repl:not(:defined) {
opacity: 0;
transition: opacity 0.3s ease-in-out;
}
io-repl {
--button-border-radius: 2px;
--button-font-family: monospace;
--input-border-radius: 2px;
}
</style>
<script type='module' src='https://www.unpkg.com/io-repl/io-repl.js'></script>
<io-repl></io-repl>

Expand Down
34 changes: 34 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
io-repl:not(:defined) {
opacity: 0;
transition: opacity 0.3s ease-in-out;
}

io-repl::part(button) {
background-color: var(--color-text);
color: var(--color-background);
border-radius: 2px;
font-size: var(--font-size-small);
font-family: var(--font-family-monospace);
font-weight: normal;
}

io-repl::part(input) {
background-color: var(--color-code-background);
color: var(--color-code-text);
font-family: var(--font-family-monospace);
font-size: var(--font-size-small);
border-color: var(--color-border);
border-radius: 2px;

&:disabled {
color: var(--color-background);
-webkit-text-fill-color: var(--color-background);
opacity: 1;
}
}

io-repl::part(output) {
color: var(--color-text);
font-family: var(--font-family-monospace);
font-size: var(--font-size-small);
}
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ nav:
theme:
name: walt
site_emoji: 🌑
extra_css:
- style.css

0 comments on commit 53cabfe

Please sign in to comment.