excalidraw/src/styles.scss

368 lines
6.3 KiB
SCSS
Raw Normal View History

@import "./theme.css";
2020-01-04 19:14:12 +01:00
body {
margin: 0;
--ui-font: Arial, Helvetica, sans-serif;
font-family: var(--ui-font);
color: var(--text-color-primary);
-webkit-text-size-adjust: 100%;
2020-01-04 19:14:12 +01:00
}
canvas {
touch-action: none;
user-select: none;
// following props improve blurriness at certain devicePixelRatios.
// AFAIK it doesn't affect export (in fact, export seems sharp either way).
image-rendering: pixelated; // chromium
// NOTE: must be declared *after* the above
image-rendering: -moz-crisp-edges; // FF
}
2020-01-04 19:14:12 +01:00
.container {
display: flex;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.panelRow {
display: flex;
justify-content: space-between;
}
.panelColumn {
display: flex;
flex-direction: column;
2020-01-04 19:14:12 +01:00
h3,
legend,
.control-label {
2020-01-20 19:59:00 -03:00
margin-top: 0.333rem;
margin-bottom: 0.333rem;
2020-01-20 19:59:00 -03:00
font-size: 0.75rem;
color: var(--text-color-primary);
font-weight: bold;
display: block;
2020-01-04 19:14:12 +01:00
}
.control-label input {
display: block;
width: 100%;
}
h3:first-child,
legend:first-child,
.control-label:first-child {
margin-top: 0;
}
legend {
padding: 0;
}
.buttonList {
flex-wrap: wrap;
2020-01-04 19:14:12 +01:00
label {
2020-01-20 19:59:00 -03:00
margin-right: 0.25rem;
font-size: 0.75rem;
display: inline-block;
}
input[type="radio"] {
opacity: 0;
position: absolute;
}
2020-01-04 19:14:12 +01:00
}
fieldset {
margin: 0;
margin-top: 0.333rem;
padding: 0;
border: none;
}
2020-01-04 19:14:12 +01:00
}
.divider {
width: 1px;
background-color: #e9ecef;
margin: 1px;
}
.buttonList label:focus-within,
input:focus {
outline: transparent;
box-shadow: 0 0 0 2px #a5d8ff;
2020-01-04 19:14:12 +01:00
}
button,
.buttonList label {
user-select: none;
background-color: #e9ecef;
border: 0;
2020-01-04 19:14:12 +01:00
border-radius: 4px;
2020-01-20 19:59:00 -03:00
margin: 0.125rem 0;
padding: 0.25rem;
white-space: nowrap;
cursor: pointer;
&:focus {
box-shadow: 0 0 0 2px #a5d8ff;
}
2020-01-04 19:14:12 +01:00
&:hover {
background-color: #ced4da;
2020-01-04 19:14:12 +01:00
}
&:active {
background-color: #adb5bd;
2020-01-04 19:14:12 +01:00
}
&:disabled {
cursor: not-allowed;
}
}
.active,
.buttonList label.active {
background-color: #ced4da;
&:hover {
background-color: #ced4da;
}
&:active {
background-color: #adb5bd;
}
}
.App-toolbar {
padding: var(--spacing);
padding-bottom: #{"max(var(--spacing), env(safe-area-inset-bottom))"};
padding-left: #{"max(var(--spacing), env(safe-area-inset-left))"};
padding-right: #{"max(var(--spacing), env(safe-area-inset-right))"};
width: 100%;
box-sizing: border-box;
overflow: auto;
position: absolute;
bottom: 0;
}
.App-toolbar-content {
display: flex;
align-items: center;
justify-content: space-between;
}
.App-toolbar,
.App-mobile-menu {
--spacing: 0.5rem;
background: #fcfcfc;
border-top: 1px solid #ccc;
}
.App-mobile-menu {
--bottom: calc(3rem - 1px + max(var(--spacing), env(safe-area-inset-bottom)));
display: grid;
position: fixed;
width: 100%;
bottom: var(--bottom);
z-index: 4;
max-height: calc(100% - var(--bottom));
overflow-y: scroll;
}
.App-mobile-menu .App-mobile-menu-scroller {
background: #fcfcfc;
box-shadow: none;
--padding: calc(4 * var(--space-factor));
padding: var(--padding);
padding-left: #{"max(var(--padding), env(safe-area-inset-left))"};
padding-right: #{"max(var(--padding), env(safe-area-inset-right))"};
}
.App-menu {
display: grid;
}
.App-menu_top {
grid-template-columns: 1fr auto 1fr;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
}
.App-menu_top > * {
pointer-events: all;
}
.App-menu_top > *:first-child {
justify-self: flex-start;
}
.App-menu_top > *:last-child {
justify-self: flex-end;
}
.App-menu_bottom {
position: fixed;
bottom: 0;
grid-template-columns: 1fr auto 1fr;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
}
.App-menu_bottom > * {
pointer-events: all;
}
.App-menu_bottom > *:first-child {
justify-self: flex-start;
}
.App-menu_bottom > *:last-child {
justify-self: flex-end;
}
.App-menu_left {
grid-template-rows: 1fr auto 1fr;
height: 100%;
}
.App-menu_right {
grid-template-rows: 1fr;
height: 100%;
}
.App-right-menu {
2020-01-20 19:59:00 -03:00
width: 13.75rem;
}
.ErrorSplash {
min-height: 100vh;
padding: 20px 0;
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
.ErrorSplash-messageContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px;
background-color: #fff5f5;
border: 3px solid #c92a2a;
}
.ErrorSplash-paragraph {
margin: 15px 0;
text-align: center;
max-width: 600px;
}
.bigger,
.bigger button {
font-size: 1.1em;
}
.smaller,
.smaller button {
font-size: 0.9em;
}
.ErrorSplash-details {
display: flex;
flex-direction: column;
align-items: flex-start;
textarea {
width: 100%;
margin: 10px 0;
font-family: "Cascadia";
font-size: 0.8em;
}
}
}
.dropdown-select {
position: absolute;
margin-bottom: 0.5em;
margin-right: 0.5em;
height: 1.5rem;
right: 0;
bottom: 0;
padding: 0 1.5rem 0 0.5rem;
background-color: #e9ecef;
border-radius: var(--space-factor);
border: 1px solid #ced4da;
font-size: 0.8rem;
outline: none;
appearance: none;
background-image: url("https://free-use.s3-us-west-2.amazonaws.com/up-sort.svg");
background-repeat: no-repeat;
background-position: right 0.7rem top 50%, 0 0;
background-size: 0.65em auto, 100%;
&:focus {
box-shadow: 0 0 0 2px #a5d8ff;
}
&:hover {
background-color: #ced4da;
}
&:active {
background-color: #ced4da;
}
}
.language-select {
@extend .dropdown-select;
right: 0;
bottom: 0;
}
.visually-hidden {
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap; /* added line */
}
.zIndexButton {
margin: 0 5px;
padding: 5px;
display: inline-flex;
align-items: center;
justify-content: center;
svg {
width: 18px;
height: 18px;
}
}
.scroll-back-to-content {
position: fixed;
left: 50%;
bottom: 20px;
transform: translateX(-50%);
padding: 10px 20px;
}
@media (max-width: 600px), (max-height: 500px) and (max-width: 1000px) {
aside {
display: none;
}
.scroll-back-to-content {
bottom: 70px;
bottom: calc(70px + env(safe-area-inset-bottom));
}
}