Files
leporello-js/styles.css

549 lines
8.6 KiB
CSS
Raw Normal View History

:root {
--shadow_color: rgb(171 200 214);
--active_color: rgb(173, 228, 253);
--error-color: #ff000024;
--warn-color: #fff6d5;
}
html, body, .app {
height: 100%;
background-color: #f4f4f4;
}
body {
margin: 0px;
}
.spinner {
display: inline-block;
height: 0.8em;
width: 0.8em;
min-width: 0.8em;
border-radius: 50%;
border-top: none !important;
border: 2px solid;
animation: rotate 0.6s linear infinite;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.app {
/* same as ace editor */
font-family: Monaco, Menlo, "Ubuntu Mono", Consolas, source-code-pro, monospace;
}
.app::backdrop {
background-color: white;
}
.root {
height: 100%;
display: grid;
grid-template-areas:
"code"
"bottom"
"statusbar";
grid-template-rows: auto 1fr 2.5em;
}
.editor_container, .bottom, .statusbar {
box-shadow: 1px 1px 3px 0px var(--shadow_color);
background-color: white;
}
.editor_container, .bottom, .statusbar {
margin: 8px;
}
.editor_container:focus-within,
.bottom:focus-within,
dialog {
outline: none;
box-shadow: 1px 1px 6px 3px var(--shadow_color);
}
.tab_content:focus-within, .problems_container:focus-within {
outline: none;
}
.editor_container {
height: 55vh;
resize: vertical;
position: relative;
grid-area: code;
font-size: 16px;
}
/* ace markers */
.selection {
position: absolute;
background-color: #ff00ff;
z-index: 1; /* make it on top of evaluated_ok and evaluated_error */
}
.evaluated_ok {
position: absolute;
background-color: rgb(225, 244, 253);
}
.evaluated_error {
position: absolute;
background-color: var(--error-color);
}
.error-code {
/*
TODO: make underline like in all editors
*/
position: absolute;
border-bottom: 4px solid red;
}
/* end of ace markers */
.eval_error {
padding: 0em 1em;
color: red;
}
/* Tabs */
.tabs {
font-family: system-ui;
display: flex;
padding-bottom: 0.5em;
}
.tabs > .tab {
margin-right: 1em;
padding: 0.3em 1em;
display: flex;
align-items: center;
}
.tabs > .tab.active {
background-color: rgb(225, 244, 253);
}
/* debugger */
.bottom {
grid-area: bottom;
overflow: auto;
display: grid;
}
.debugger {
display: flex;
flex-direction: column;
}
.debugger_wrapper {
display: flex;
flex: 1;
flex-direction: column;
overflow: auto;
}
.debugger, .problems_container {
padding: 5px;
overflow: auto;
}
.logs, .io_trace {
padding-left: 1em;
}
.logs .log {
cursor: pointer;
}
.logs .log.active {
background-color: var(--active_color) !important;
}
.logs .log.error {
background-color: var(--error-color);
color: black !important; /* override red color that is set for calltree */
&.native {
color: grey !important;
}
}
.logs .log.warn {
background-color: var(--warn-color);
}
.tab_content {
flex: 1;
overflow: auto;
}
.callnode {
/* This makes every callnode be the size of the the longest one, so
* every callnode is clickable anywhere in the calltree view, and
* background for active callnodes is as wide as the entire container.
* Useful when scrolling very wide call trees */
min-width: fit-content;
margin-left: 1em;
}
.callnode .active {
background-color: var(--active_color);
}
.call_el {
/*
Make active callnode background start from the left of the calltree
view
*/
margin-left: -1000vw;
padding-left: 1000vw;
width: 100%;
cursor: pointer;
display: inline-block;
}
.call_el .expand_icon, .call_el .expand_icon_placeholder {
padding-left: 5px;
padding-right: 2px;
}
.call_header {
white-space: nowrap;
}
.call_header.error {
color: red;
}
.call_header.error.native {
color: red;
}
.call_header.native {
font-style: italic;
color: grey;
}
.call_header .loop_step {
color: grey;
font-size: 0.9em;
margin-right: 0.3em;
}
/* io trace */
.io_trace .event {
border-radius: 1em;
line-height: 2em;
padding: 0.1em 0.5em;
background-color: var(--active_color);
}
/* problems view */
.problem a {
color: red;
}
/* files */
.files_container {
overflow: auto;
display: flex;
flex-direction: column;
}
.allow_file_access {
display: flex;
flex-direction: column;
}
.allow_file_access .subtitle {
font-size: 0.8em;
}
.files {
overflow: auto;
padding: 5px;
}
.files .file {
margin-left: 1em;
}
.files > .file {
margin-left: 0em !important;
}
.files .file_title {
display: flex;
margin-left: -100vw;
padding-left: 100vw;
}
.files .file_title.active {
background-color: var(--active_color);
}
.files .file_title .select_entrypoint {
margin-left: auto;
width: 3em;
margin-right: 0.7em;
text-align: center;
}
.files .file_title .icon {
display: inline-block;
margin-right: 5px;
width: 1em;
}
.file_actions {
font-family: system-ui;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 1em;
background-color: rgb(225 244 253 / 80%);
}
.file_actions .file_action {
margin-right: 2em;
}
.file_actions .select_entrypoint_title {
width: 3em;
text-align: center;
}
/* value_explorer */
.embed_value_explorer_container.is_not_dom_el {
height: 0px;
}
.embed_value_explorer_container.is_dom_el {
padding: 1em;
}
.embed_value_explorer_wrapper {
/* preserve wrapper from getting clicks for code line left to it */
pointer-events: none;
}
.embed_value_explorer_container.is_not_dom_el .embed_value_explorer_wrapper {
margin-left: 1em;
}
.embed_value_explorer_content {
pointer-events: initial;
white-space: pre;
max-width: fit-content;
background-color: white;
box-shadow: 1px 2px 9px -1px var(--shadow_color);
}
.embed_value_explorer_content:focus {
outline: none;
box-shadow: 1px 2px 11px 1px var(--shadow_color);
}
.embed_value_explorer_content > .value_explorer_node {
margin-left: 0 !important;
}
.embed_value_explorer_control {
display: block;
margin-bottom: 1em;
font-size: 0.9em;
}
.value_explorer_node {
margin-left: 1em;
}
.value_explorer_header {
display: inline-block;
padding-right: 1em;
cursor: pointer;
}
.value_explorer_header .expand_icon {
padding: 5px;
}
.value_explorer_header.active {
background-color: rgb(148, 227, 191);
}
.value_explorer_key {
color: rgb(150, 0, 128);
font-weight: bold;
}
/* status */
.statusbar {
font-family: system-ui;
margin-bottom: 0px;
grid-area: statusbar;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.statusbar .spinner {
margin-right: 0.5em;
}
.status, .current_file {
font-size: 1.5em;
}
.status {
color: red;
}
.statusbar_action {
margin-right: 2em;
}
.statusbar_action.first {
margin-left: auto;
}
.open_app_window_button {
position: relative;
}
.open_app_window_tooltip {
padding: 1em;
position: absolute;
margin-bottom: 20px;
bottom: 100%;
border: none;
font-size: 1.7em;
background-color: rgb(120 206 247);
border-radius: 21px;
transform: scale(0);
transition: transform 0.3s;
}
.open_app_window_tooltip.on {
transform: scale(1);
}
.open_app_window_tooltip:after {
content: '';
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid rgb(120 206 247);
position: absolute;
bottom: -20px;
left: 50%;
transform: translate(-50%);
}
.options {
padding: 5px;
}
.options > * {
margin: 5px;
}
.show_help, .github {
margin: 0em 0.5em;
}
.statusbar_button, .upload_button {
border: none;
color: white;
background: rgb(23 166 236);
}
.statusbar_button {
font-size: 1.2em;
margin-left: 1em;
&:last-of-type {
margin: 0em 0.5em;
}
}
.statusbar_button[disabled] {
background: grey;
}
.share_dialog input, .share_dialog button {
font-size: 1.2em;
}
.share_dialog button {
padding: 5px;
height: 2em;
}
dialog {
border: none;
}
dialog::backdrop {
background-color: rgb(225 244 253 / 80%);
}
.help_dialog[open] {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0;
min-width: 70%;
min-height: 70%;
background-color: white;
}
.help {
padding: 2em;
border-spacing: 5px;
}
.help th {
padding: 0.5em;
}
.help th.key {
width: 5em;
}
.help td.key {
background-color: rgb(225, 244, 253, 0.5);
border-radius: 10px;
text-align: center;
}
.help_dialog form {
margin-bottom: 1em;
}
.panel:not([open]) {
display: none;
}
.panel[open] {
padding: 0px;
margin: 0px 0px 0px auto;
height: 100%;
max-height: 100%;
animation: slide-in 0.2s ease-in forwards;
&::backdrop {
background-color: rgb(225 244 253 / 60%);
}
}
@keyframes slide-in{
0% {
transform: translateX(100%);
}
100% {
transform: translateX(0);
}
}