Files
leporello-js/styles.css

735 lines
12 KiB
CSS
Raw Permalink 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::backdrop {
background-color: white;
}
.root {
height: 100%;
display: grid;
grid-template-areas:
"code"
"bottom"
"statusbar";
grid-template-rows: auto 1fr auto;
}
.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;
overflow: auto;
position: relative;
grid-area: code;
font-size: 16px;
}
/*
Makes cursor visible, but not blinking when focus is not in the editor. We
make it like that so transitions are visible when navigating calltree view
*/
.editor_container:not(:focus-within) .monaco-editor .cursor {
visibility: visible !important;
}
/* ace markers */
.selection {
background-color: rgb(148, 227, 191);
}
.evaluated_ok {
background-color: rgba(195, 233, 251, 0.5);
}
.evaluated_error {
background-color: var(--error-color);
}
/* 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 0.8em 0.3em 1em;
display: flex;
align-items: center;
color: inherit;
text-decoration: none;
.hotkey_key {
font-size: 0.8em;
}
.tab_label {
color: linktext;
text-decoration: underline;
}
&.active {
background-color: rgb(225, 244, 253);
}
}
/* debugger */
.bottom {
font-family: var(--code-font-family);
line-height: var(--code-line-height);
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;
}
.debugger .run_button {
margin: 1em;
color: inherit;
text-decoration: none;
font-family: system-ui;
.run_button_label {
color: linktext;
text-decoration: underline;
}
}
.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);
}
.callnode .deferred_calls {
margin-left: 0em;
}
.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: 0px 5px;
}
.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 {
display: flex;
flex-direction: column;
}
.file_tab_container {
visibility: visible;
display: flex;
flex-direction: column;
overflow: auto;
&.hidden {
visibility: hidden;
height: 0;
overflow: hidden;
}
}
.files {
font-family: var(--code-font-family);
line-height: var(--code-line-height);
overflow: auto;
padding: 5px;
}
.files .file {
margin-left: 1em;
cursor: pointer;
}
.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_tabs {
display: flex;
justify-content: space-evenly;
font-family: system-ui;
align-items: center;
.tab {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
padding: 0.8em;
margin: 0.2em;
&.active {
background-color: rgb(225, 244, 253);
}
&.disabled {
color: grey;
}
.file_access {
font-size: 0.8em;
}
}
}
.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;
&.disabled {
color: grey;
pointer-events: none;
}
}
.file_actions .select_entrypoint_title {
width: 3em;
text-align: center;
margin-left: auto;
}
/* value_explorer */
.embed_value_explorer_container.is_not_dom_el {
visibility: visible !important; /* prevent monaco editor from hiding it */
height: 0px;
font-family: var(--code-font-family);
line-height: var(--code-line-height);
}
.embed_value_explorer_container.is_dom_el {
padding: 1em;
/* Make it on top of monaco editor */
z-index: 1;
}
.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 {
overflow-x: auto;
overflow-y: hidden; /* hide vertical scrollbar */
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_content {
.hotkey_step_into {
margin-right: 1em;
}
&:not(:focus) {
.hotkey_unfocus {
display: none;
}
}
&:focus {
.hotkey_focus {
display: none;
}
}
&.hotkeys_right {
display: flex;
flex-direction: row;
}
.value_explorer_hotkeys {
font-weight: 200;
font-family: system-ui;
font-size: 0.9em;
}
&.hotkeys_bottom {
.value_explorer_hotkeys {
margin: 1em 0.5em 0.3em 0.5em;
}
}
&.hotkeys_right {
.value_explorer_hotkeys {
margin: 0em 1em;
}
}
}
.value_explorer_node {
margin-left: 1em;
&.is_calltree_node_explorer > .value_explorer_header {
display: none;
}
&.is_calltree_node_explorer > .value_explorer_node {
margin-left: 0em;
}
}
.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;
}
.jump_here {
padding: 0em 1em;
font-family: system-ui;
}
/* 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 {
font-size: 1.5em;
color: red;
margin-left: 1em;
}
.statusbar_module_with_spinner {
display: flex;
flex-direction: row;
align-items: center;
}
.statusbar_controls {
display: flex;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.statusbar_actions {
display: flex;
flex-direction: column;
}
.open_app_window_button {
position: relative;
}
.onboarding_tooltip {
padding: 1em;
min-width: 10em;
position: absolute;
margin-bottom: 20px;
bottom: 100%;
border: none;
font-size: 1.7em;
background-color: rgb(120 206 247);
border-radius: 21px;
left: 50%;
transform: translate(-50%) scale(0);
transition: transform 0.3s;
}
.onboarding_tooltip.on {
transform: translate(-50%) scale(1);
}
.onboarding_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%);
}
.statusbar_links {
display: flex;
flex-direction: column;
}
.options {
display: flex;
flex-direction: column;
}
.show_help, .website {
margin: 0em 0.5em;
}
.website:visited {
color: linktext;
}
.inspect_jsx {
position: relative;
cursor: pointer;
user-select: none;
display: flex;
align-self: stretch;
flex-direction: row;
flex: 0;
align-items: center;
padding: 0em 0.5em;
input {
display: none;
}
&:hover {
background-color: rgb(0, 0, 0, 0.1);
}
&:has(input:checked) {
background-color: #0000ee14;
color: linktext;
}
.onboarding_tooltip {
font-size: 1em;
}
}
.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 {
font-family: system-ui;
}
.share_dialog input, .share_dialog button {
font-size: 1.2em;
}
.share_dialog button {
padding: 5px;
height: 2em;
}
.share_name {
display: flex;
flex-direction: row;
align-items: center;
label {
margin-right: 1em;
}
input {
margin-right: 2em;
flex: 1;
}
margin: 1em 0em 2em 0em;
}
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;
}
.hotkey_key {
margin-left: 5px;
background-color: #e5e5e5;
border-radius: 5px;
padding: 0px 8px;
}
.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);
}
}
.display-none {
display: none !important;
}