1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-04-16 07:41:03 +00:00

Set tab width for frontend to 2 spaces

This commit is contained in:
Romein van Buren 2023-01-18 11:25:08 +01:00
parent 1c12dcabc0
commit 72362b2c1f
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
3 changed files with 90 additions and 80 deletions

4
frontend/.editorconfig Normal file
View File

@ -0,0 +1,4 @@
[*]
tab_width = 2
insert_final_newline = true
indent_style = space

View File

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport"/> <meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>mongodup</title> <title>Mongodup</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="./src/main.js" type="module"></script> <script src="./src/main.js" type="module"></script>
</body> </body>
</html> </html>

View File

@ -1,141 +1,147 @@
:root { :root {
--darwin-titlebar-height: 36px; --darwin-titlebar-height: 36px;
} }
html, html,
body { body {
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
margin: 0; Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
padding: 0; margin: 0;
-webkit-user-select: none; padding: 0;
user-select: none; -webkit-user-select: none;
cursor: default; user-select: none;
font-size: 15px; cursor: default;
line-height: 15px; font-size: 15px;
background-color: rgba(0, 0, 0, 0); line-height: 15px;
background-color: rgba(0, 0, 0, 0);
} }
* { * {
vertical-align: middle; vertical-align: middle;
box-sizing: border-box; box-sizing: border-box;
overscroll-behavior: none; overscroll-behavior: none;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
touch-action: none; touch-action: none;
} }
p { p {
margin: 1rem 0; margin: 1rem 0;
} }
p:first-child { p:first-child {
margin-top: 0; margin-top: 0;
} }
p:last-child { p:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
p strong { p strong {
font-weight: 700; font-weight: 700;
} }
.loading { .loading {
cursor: wait; cursor: wait;
} }
.field { .field {
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
align-items: stretch; align-items: stretch;
} }
.field > * { .field > * {
padding: 0.5rem; padding: 0.5rem;
border: 1px solid #ccc; border: 1px solid #ccc;
border-right: none; border-right: none;
display: inline-block; display: inline-block;
margin: 0; margin: 0;
background-color: #fff; background-color: #fff;
} }
.field .label { .field .label {
background-color: #eee; background-color: #eee;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.field > :first-child { .field > :first-child {
border-top-left-radius: 10px; border-top-left-radius: 10px;
border-bottom-left-radius: 10px; border-bottom-left-radius: 10px;
} }
.field > :last-child { .field > :last-child {
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
border-top-right-radius: 10px; border-top-right-radius: 10px;
border-bottom-right-radius: 10px; border-bottom-right-radius: 10px;
} }
.field > input, .field > input,
.field > textarea, .field > textarea,
.field > select { .field > select {
flex: 1; flex: 1;
} }
.field > input:focus, .field > input:focus,
.field > textarea:focus, .field > textarea:focus,
.field > select:focus { .field > select:focus {
outline: none; outline: none;
border-color: #00008b; border-color: #00008b;
box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.2); box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.2);
} }
.field > input.invalid, .field > input.invalid,
.field > textarea.invalid, .field > textarea.invalid,
.field > select.invalid { .field > select.invalid {
background-color: rgba(255, 80, 80, 0.3); background-color: rgba(255, 80, 80, 0.3);
border-color: rgb(255, 80, 80); border-color: rgb(255, 80, 80);
} }
.field > span.checkbox { .field > span.checkbox {
text-align: center; text-align: center;
min-width: 75px; min-width: 75px;
} }
.field > select { .field > select {
appearance: none; appearance: none;
padding: 0.5rem 2rem 0.5rem 0.5rem; padding: 0.5rem 2rem 0.5rem 0.5rem;
background: #fff; background: #fff;
background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right 0.5rem center; background-position: right 0.5rem center;
} }
.btn { .btn {
background-color: #00008b; background-color: #00008b;
padding: 0.5rem; padding: 0.5rem;
border-radius: 10px; border-radius: 10px;
color: #fff; color: #fff;
} }
.btn:focus { .btn:focus {
box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.2); box-shadow: 0 0 0 3px rgba(0, 0, 139, 0.2);
outline: none; outline: none;
} }
.btn.danger { .btn.danger {
background-color: #c00; background-color: #c00;
} }
.btn.danger:focus { .btn.danger:focus {
box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.2); box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.2);
} }
.btn:disabled { .btn:disabled {
opacity: 0.5; opacity: 0.5;
cursor: not-allowed; cursor: not-allowed;
} }
.btn svg { .btn svg {
height: 15px; height: 15px;
width: auto; width: auto;
vertical-align: bottom; vertical-align: bottom;
} }
code, .code { code,
font-family: Menlo, monospace; .code {
font-family: Menlo, monospace;
} }
@keyframes flashGreen { @keyframes flashGreen {
0% { color: #0d0; } 0% {
100% { color: unset; } color: #0d0;
}
100% {
color: unset;
}
} }
.flash-green { .flash-green {
animation: 1s ease-out 0s 1 flashGreen; animation: 1s ease-out 0s 1 flashGreen;
} }