Skip to content

Commit

Permalink
refactor: Extract style tag contents to CSS files
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Jun 18, 2024
1 parent f124238 commit 9850f20
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
9 changes: 0 additions & 9 deletions src/components/controllers/repl/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,6 @@ export class Repl extends Component {
const ReplWrapper = ({ loading, children }) => (
<div class={style.repl}>
<loading-bar showing={!!loading} />
<style>{`
main {
height: 100% !important;
overflow: hidden !important;
}
footer {
display: none !important;
}
`}</style>
{children}
</div>
);
5 changes: 5 additions & 0 deletions src/components/controllers/repl/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@
width: 100%;
height: 100%;
}

:global(main) {
height: 100% !important;
overflow: hidden !important;
}
11 changes: 0 additions & 11 deletions src/components/controllers/tutorial/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,16 +309,6 @@ function TutorialView({
);
}

const REPL_CSS = `
main {
height: 100% !important;
overflow: hidden !important;
}
footer {
display: none !important;
}
`;

function ReplWrapper({
tutorialLoading,
solvable,
Expand All @@ -330,7 +320,6 @@ function ReplWrapper({
return (
<div class={style.tutorial}>
<loading-bar showing={!!tutorialLoading} />
<style>{REPL_CSS}</style>
<div
class={cx(
style.tutorialWrapper,
Expand Down
6 changes: 6 additions & 0 deletions src/components/controllers/tutorial/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,9 @@
.output {
height: 100%;
}

/* For REPL */
:global(main) {
height: 100% !important;
overflow: hidden !important;
}

0 comments on commit 9850f20

Please sign in to comment.