From ad3cd98d6e932efddfb6ef3e5eabae575167b3d2 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 22 Sep 2023 11:59:39 +0200 Subject: [PATCH] CSS fixes protocol page --- .../dashboard/create_task_modal.scss | 22 --------- .../stylesheets/extend/perfect-scrollbar.scss | 47 +++++++++++++++++++ .../my_modules/protocols/index.scss | 6 +-- app/assets/stylesheets/shared/select.scss | 8 ++-- app/assets/stylesheets/tailwind/modals.css | 2 +- .../packs/vue/navigation/top_menu.js | 3 +- app/javascript/vue/navigation/top_menu.vue | 39 +++++++-------- app/javascript/vue/protocol/container.vue | 2 +- app/javascript/vue/results/result.vue | 2 +- .../vue/shared/content/modal/move.vue | 2 +- .../vue/shared/reorderable_items_modal.vue | 2 +- app/javascript/vue/shared/select.vue | 13 +++-- .../dashboards/_create_task_modal.html.erb | 1 - .../_module_header_details_popover.html.erb | 20 ++++---- app/views/my_modules/protocols.html.erb | 4 +- .../_repositories_dropdown_list.html.erb | 26 +++++----- 16 files changed, 108 insertions(+), 91 deletions(-) diff --git a/app/assets/stylesheets/dashboard/create_task_modal.scss b/app/assets/stylesheets/dashboard/create_task_modal.scss index e24d0bf0d..44e5f17f7 100644 --- a/app/assets/stylesheets/dashboard/create_task_modal.scss +++ b/app/assets/stylesheets/dashboard/create_task_modal.scss @@ -47,28 +47,6 @@ position: relative; } - .down-arrow { - background-color: $color-white; - box-shadow: -4px 4px 0 $color-black; - display: inline-block; - height: 38px; - margin: 0 11px 20px 14px; - opacity: .2; - width: 38px; - } - - .down-arrow::before { - border-bottom: 6px solid transparent; - border-left: 8px solid $color-black; - border-top: 6px solid transparent; - content: ""; - height: 0; - left: 46px; - position: absolute; - top: 38px; - width: 0; - } - .project-visibility-container { display: inline-block; width: 260px; diff --git a/app/assets/stylesheets/extend/perfect-scrollbar.scss b/app/assets/stylesheets/extend/perfect-scrollbar.scss index 98127c311..ea9bc6e6c 100644 --- a/app/assets/stylesheets/extend/perfect-scrollbar.scss +++ b/app/assets/stylesheets/extend/perfect-scrollbar.scss @@ -16,10 +16,33 @@ -webkit-transition: background-color .2s linear, opacity .2s linear; height: 16px; opacity: 0.6; + margin: 0 1rem 0 5px; /* there must be 'bottom' or 'top' for ps__rail-x */ bottom: 0px; /* please don't change 'position' */ position: absolute; + + &::after, + &::before { + content: ''; + display: block; + background-color: var(--sn-white); + height: 1rem; + position: absolute; + width: 1rem; + top: 0 + } + + &::after { + right: -1rem; + border-bottom-right-radius: 4px; + } + + &::before { + left: -5px; + border-bottom-left-radius: 4px; + width: 5px; + } } .ps__rail-y { @@ -28,12 +51,36 @@ -webkit-transition: background-color .2s linear, opacity .2s linear; width: 16px; opacity: 0.6; + margin: 1rem 0; /* there must be 'right' or 'left' for ps__rail-y */ right: 0; /* please don't change 'position' */ position: absolute; + cursor: pointer; z-index: 5; + + &::after, + &::before { + content: ''; + display: block; + position: absolute; + background-color: var(--sn-white); + height: 1rem; + width: 1rem; + left: 0 + } + + &::after { + bottom: -1rem; + border-bottom-right-radius: 4px; + } + + &::before { + border-bottom-right-radius: 4px; + top: -1rem; + } + } .ps--active-x > .ps__rail-x, diff --git a/app/assets/stylesheets/my_modules/protocols/index.scss b/app/assets/stylesheets/my_modules/protocols/index.scss index 3d6234ae7..6e5095245 100644 --- a/app/assets/stylesheets/my_modules/protocols/index.scss +++ b/app/assets/stylesheets/my_modules/protocols/index.scss @@ -144,10 +144,6 @@ z-index: 251; .repository { - @include font-button; - cursor: pointer; - display: flex; - padding: 8px 16px; .assigned-items, .shared-icon { @@ -579,7 +575,7 @@ z-index: 251; .task-details-value { - @include font-h3; + font-weight: bold; } .row-v-margin { diff --git a/app/assets/stylesheets/shared/select.scss b/app/assets/stylesheets/shared/select.scss index 86cc3d429..0ccf4fe3c 100644 --- a/app/assets/stylesheets/shared/select.scss +++ b/app/assets/stylesheets/shared/select.scss @@ -53,14 +53,14 @@ background: transparent; border: 0; display: none; + height: 26px; outline: 0; + padding: 0; width: calc(100% - 1.5em); } &.sn-select--open { background: $color-white; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; border-color: var(--sn-science-blue); .sn-select__search-input { @@ -82,12 +82,10 @@ } .sn-select__option { - line-height: 1.75rem; overflow: hidden; - padding: .5rem 1rem; text-overflow: ellipsis; white-space: nowrap; - width: calc(100%); + width: 100%; } .select__option-placeholder { diff --git a/app/assets/stylesheets/tailwind/modals.css b/app/assets/stylesheets/tailwind/modals.css index 22a1deb35..ba58d23b2 100644 --- a/app/assets/stylesheets/tailwind/modals.css +++ b/app/assets/stylesheets/tailwind/modals.css @@ -53,7 +53,7 @@ } .modal .modal-content { - @apply relative border border-solid rounded outline-none shadow p-6 bg-sn-white; + @apply relative rounded outline-none shadow p-6 bg-sn-white; } .modal .modal-header { diff --git a/app/javascript/packs/vue/navigation/top_menu.js b/app/javascript/packs/vue/navigation/top_menu.js index d157e0232..30b71f63d 100644 --- a/app/javascript/packs/vue/navigation/top_menu.js +++ b/app/javascript/packs/vue/navigation/top_menu.js @@ -3,9 +3,10 @@ import Vue from 'vue/dist/vue.esm'; import TopMenuContainer from '../../../vue/navigation/top_menu.vue'; import PerfectScrollbar from 'vue2-perfect-scrollbar'; import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css'; +import outsideClick from '../directives/outside_click'; Vue.use(PerfectScrollbar); - +Vue.directive('click-outside', outsideClick); Vue.prototype.i18n = window.I18n; function addNavigationTopMenuContainer() { diff --git a/app/javascript/vue/navigation/top_menu.vue b/app/javascript/vue/navigation/top_menu.vue index d80776d74..27c7331e4 100644 --- a/app/javascript/vue/navigation/top_menu.vue +++ b/app/javascript/vue/navigation/top_menu.vue @@ -14,23 +14,14 @@ @change="switchTeam" > - +
-