-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Css for Repl #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Css for Repl #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great (just left a minor comment)! 🚀 Thank you
@@ -80,12 +79,20 @@ export class PyRepl extends BaseEvalElement { | |||
// } | |||
// }) | |||
]; | |||
const customTheme = EditorView.theme({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Picky comment here.. Maybe we could move this config to the top of the file as a const for more exposure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to the top of the corresponding function, the linter took care of this one.
@princiya are you ready to merge this (after conflicts are resolved) or did you want to address anything else? |
@fpliger I will also address the repl2 component's styling in this PR itself. Thanks for the design suggestions. |
pyscriptjs/examples/repl2.html
Outdated
@@ -10,6 +10,25 @@ | |||
<link rel="stylesheet" href="../build/pyscript.css" /> | |||
|
|||
<script defer src="../build/pyscript.js"></script> | |||
|
|||
<style> | |||
#output > div { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not find any other way to style the right output panel other than directly adding CSS here.
I tried to add CSS in interpreter.js
in the write
function, but that function (sometimes) also renders additional div
element. That's why I chose to control the empty div
elements via CSS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we add the additional css to separate file? It'd make the example look cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you! Left a couple of minor comments.. if you can take care of them quickly great, otherwise we can merge and I fix it in a quick follow up PR
pyscriptjs/examples/repl2.html
Outdated
@@ -10,6 +10,25 @@ | |||
<link rel="stylesheet" href="../build/pyscript.css" /> | |||
|
|||
<script defer src="../build/pyscript.js"></script> | |||
|
|||
<style> | |||
#output > div { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we add the additional css to separate file? It'd make the example look cleaner
pyscriptjs/src/components/pyrepl.ts
Outdated
// add Editor to main PyScript div | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we delete these?
I am trying to remove the black dotted border that appears when repl is focused, but the styles come from Codemirror.net. I was able to extend the theme but not able to override the dotted outline, will try to figure out more and improve CSS for Repl2 next.