Skip to content

Commit a7c8344

Browse files
Style fixes
1 parent e61845e commit a7c8344

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

runestone/activecode/js/activecode_brython.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export default class BrythonActiveCode extends ActiveCode {
3333
height: max-content; width: 100%;
3434
}
3535
.container-pre{
36-
background: white; font-size: 13px; line-height: 1.42857143; border: 1px solid #ccc; border-radius: 4px;
37-
position: fixed; bottom: 0px; width: 94%; max-height: 200px; overflow: auto; clear: both; resize: both; transform: scale(1, -1);
36+
background: white; font-size: 13px; line-height: 1.42857143; border: 1px solid #ccc; border-radius: 4px; visibility: hidden;
37+
position: fixed; bottom: 0px; width: 94%; max-width: 96%; max-height: 200px; overflow: auto; clear: both; resize: both; transform: scale(1, -1);
3838
}
3939
pre {
4040
position: sticky; padding: 12px; transform: scale(1, -1);
@@ -65,7 +65,7 @@ sys.stderr = sys.stdout = NewOut()
6565
def my_exec(code):
6666
try:
6767
exec(code, locals())
68-
preElem.style.visibility = "visible"
68+
container.style.visibility = "visible"
6969
out_header = document.createElement("text")
7070
out_header.innerHTML = "Output"
7171
out_header.style.font = "24px 'Arial'"
@@ -98,10 +98,10 @@ def my_exec(code):
9898
error_header.innerHTML = "Error"
9999
error_header.style.font = "24px 'Arial'"
100100
preElem.prepend(error_header)
101-
preElem.style.visibility = "visible"
102-
preElem.style.backgroundColor = "#f2dede"
103-
preElem.style.border = "1px solid #ebccd1"
104-
logger.classList.add("python")
101+
container.style.visibility = "visible"
102+
container.style.backgroundColor = "#f2dede"
103+
container.style.border = "1px solid #ebccd1"
104+
logger.classList.add("plaintext")
105105
106106
document <= container
107107

0 commit comments

Comments
 (0)