From 3d963a7719546b24476c79cf56bd91b6b35bc1bb Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Sat, 7 Aug 2021 14:51:13 +0530 Subject: [PATCH] feat: floating input label --- assets/scss/styles.scss | 23 ++++++++ components/collections/Add.vue | 10 ++-- components/collections/AddFolder.vue | 10 ++-- components/collections/Edit.vue | 10 ++-- components/collections/EditFolder.vue | 9 ++-- components/collections/EditRequest.vue | 10 ++-- components/collections/SaveRequest.vue | 21 ++++---- components/collections/graphql/Add.vue | 10 ++-- components/collections/graphql/AddFolder.vue | 10 ++-- components/collections/graphql/Edit.vue | 10 ++-- components/collections/graphql/EditFolder.vue | 11 ++-- .../collections/graphql/EditRequest.vue | 10 ++-- .../collections/graphql/ImportExport.vue | 2 - components/environments/Add.vue | 10 ++-- components/environments/Edit.vue | 10 ++-- components/environments/ImportExport.vue | 2 - components/firebase/Login.vue | 12 ++--- components/smart/Modal.vue | 2 +- components/teams/Add.vue | 10 ++-- components/teams/Edit.vue | 10 ++-- helpers/oauth.js | 3 ++ lang/en-US.json | 1 + newstore/settings.ts | 2 +- pages/settings.vue | 52 ++++++------------- 24 files changed, 132 insertions(+), 128 deletions(-) diff --git a/assets/scss/styles.scss b/assets/scss/styles.scss index 9101d08f6..2e07608e7 100644 --- a/assets/scss/styles.scss +++ b/assets/scss/styles.scss @@ -198,6 +198,29 @@ button { @apply hidden; } +.floating-input ~ label { + @apply font-semibold; + @apply py-0.5; + @apply px-2; + @apply m-2; + @apply rounded; + @apply transition; + @apply absolute; +} + +.floating-input:focus-within ~ label, +.floating-input:not(:placeholder-shown) ~ label { + @apply bg-primary; + @apply transform; + @apply origin-center; + @apply scale-75; + @apply -translate-y-6; +} + +.floating-input:focus-within ~ label { + @apply text-accent; +} + pre.ace_editor { @apply font-mono; @apply resize-none; diff --git a/components/collections/Add.vue b/components/collections/Add.vue index ab9d0391e..efa177c44 100644 --- a/components/collections/Add.vue +++ b/components/collections/Add.vue @@ -6,17 +6,17 @@