Skip to content

Build your personal knowledge base with Trilium Notes

style/text editor/forms: restyle text boxes

Adorian Doran1e2e3498c67c
diff --git a/apps/client/src/stylesheets/theme-next/forms.css b/apps/client/src/stylesheets/theme-next/forms.css
index f4465f905a..7802d7c5a5 100644
--- a/apps/client/src/stylesheets/theme-next/forms.css
+++ b/apps/client/src/stylesheets/theme-next/forms.css
@@ -149,6 +149,7 @@ input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
+input.ck.ck-input-text[type="text"],
textarea.form-control,
textarea,
.tn-input-field {
@@ -167,6 +168,7 @@ input[type="password"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="datetime-local"]:hover,
+input.ck.ck-input-text[type="text"]:hover,
textarea.form-control:hover,
textarea:hover,
.tn-input-field:hover {
@@ -181,6 +183,7 @@ input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
+input.ck.ck-input-text[type="text"]:focus,
textarea.form-control:focus,
textarea:focus,
.tn-input-field:focus,
diff --git a/apps/client/src/stylesheets/theme-next/notes/text.css b/apps/client/src/stylesheets/theme-next/notes/text.css
index 5514d287fa..3a42463bb6 100644
--- a/apps/client/src/stylesheets/theme-next/notes/text.css
+++ b/apps/client/src/stylesheets/theme-next/notes/text.css
@@ -370,7 +370,7 @@ div.ck-template-form {
}
div.ck-template-form .ck-labeled-field-view {
- margin: 8px 0;
+ margin-bottom: 8px;
}
/* Template item */
@@ -448,6 +448,26 @@ div.ck-template-form .ck-search__info span:nth-child(2) {
background: transparent;
}
+/*
+ * FORMS
+ */
+
+/*
+ * Text boxes
+ */
+
+.ck.ck-labeled-field-view {
+ padding-top: 1.5em !important; /* Create space for the label */
+}
+
+.ck.ck-labeled-field-view > .ck.ck-labeled-field-view__input-wrapper > label.ck.ck-label {
+ transform: translate(0, -1.7em) !important; /* Move the label above the text box regardless of the text box state */
+ padding-left: 0 !important;
+ background: transparent;
+ font-size: .85em;
+ font-weight: 600;
+}
+
/*
* EDITOR'S CONTENT
*/