Created
October 14, 2017 12:58
-
-
Save kennasoft/d4f8594f7a06751b73dfb6a6cf4390ed to your computer and use it in GitHub Desktop.
CSS for adding a rudimentary console to jsfiddle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
footer, | |
footer *, | |
footer *:before, | |
footer *:after { | |
box-sizing: border-box; | |
} | |
.console { | |
background: black; | |
width: 100%; | |
position: absolute; | |
bottom: 0; | |
min-height: 100%; | |
font-family: monospace; | |
overflow-y: scroll; | |
} | |
.console-log { | |
color: white; | |
} | |
.console-error { | |
color: red; | |
} | |
#console-toggle { | |
width: 100%; | |
background: #ddd; | |
position: absolute; | |
height: 0; | |
bottom: 0; | |
transition: height .1s linear; | |
} | |
#console-toggle::before { | |
content: ' '; | |
width: 100%; | |
position: absolute; | |
top: -5px; | |
height: 5px; | |
padding: 5px; | |
background: #ddd; | |
} | |
#console-toggle::after { | |
content: 'console'; | |
font-weight: bold; | |
color: red; | |
padding: 5px 10px; | |
text-align: center; | |
font-family: monospace; | |
border-radius: 5px 5px 0 0; | |
width: auto; | |
height: 15px; | |
position: absolute; | |
right: 15px; | |
top: -25px; | |
background: #ddd; | |
cursor: pointer; | |
} | |
#console-toggle.open { | |
height: 75%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment