From 77861dba0b0606209f4fe66f0b807d18f0a3f5b3 Mon Sep 17 00:00:00 2001 From: James Rushford <jrushford@gitlab.com> Date: Tue, 10 Sep 2024 11:14:03 +0000 Subject: [PATCH] Remove SCSS classes that are not reference anywhere Part 1 --- app/assets/stylesheets/framework/awards.scss | 13 ---- app/assets/stylesheets/framework/blocks.scss | 9 --- .../stylesheets/framework/breadcrumbs.scss | 22 ------- .../framework/broadcast_messages.scss | 6 -- app/assets/stylesheets/framework/buttons.scss | 4 -- app/assets/stylesheets/framework/common.scss | 17 +----- app/assets/stylesheets/framework/diffs.scss | 15 ----- .../stylesheets/framework/dropdowns.scss | 60 +------------------ .../framework/vue_transitions.scss | 5 ++ 9 files changed, 8 insertions(+), 143 deletions(-) diff --git a/app/assets/stylesheets/framework/awards.scss b/app/assets/stylesheets/framework/awards.scss index 66355317d18b..db882f78b298 100644 --- a/app/assets/stylesheets/framework/awards.scss +++ b/app/assets/stylesheets/framework/awards.scss @@ -177,18 +177,6 @@ } } - &.user-authored { - cursor: default; - background-color: $gray-10; - border-color: $gray-100; - color: $gl-text-color-disabled; - - gl-emoji { - opacity: 0.4; - filter: grayscale(100%); - } - } - &.btn { &:focus { outline: 0; @@ -196,7 +184,6 @@ } &.is-loading { - .award-control-icon-normal, .emoji-icon { display: none; } diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index 5d35a71f3f14..c034df6b6269 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -42,11 +42,6 @@ margin-bottom: 0; } - &.clear-block { - margin-bottom: $gl-padding - 1px; - padding-bottom: $gl-padding; - } - &.second-block { margin-top: -1px; margin-bottom: 0; @@ -77,10 +72,6 @@ > .controls { float: right; } - - .new-branch { - margin-top: 3px; - } } .content-block-small { diff --git a/app/assets/stylesheets/framework/breadcrumbs.scss b/app/assets/stylesheets/framework/breadcrumbs.scss index c56cd09c5d48..2ccaeb193267 100644 --- a/app/assets/stylesheets/framework/breadcrumbs.scss +++ b/app/assets/stylesheets/framework/breadcrumbs.scss @@ -32,25 +32,3 @@ flex-grow: 1; } } - -/* - * This temporarily restores the legacy breadcrumbs styles on the primary HAML breadcrumbs. - * Those styles got changed in https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/3663, - * causing a regression in this particular instance which does not use a Vue component and is - * therefore unable to collapse overflowing items within a disclosure dropdown. - * These temporary overrides will be removed as part of https://gitlab.com/gitlab-org/gitlab/-/issues/358113. - */ -.tmp-breadcrumbs-fix { - .gl-breadcrumb-list { - flex-wrap: wrap; - max-width: none; - - .gl-breadcrumb-item { - > a { - @include media-breakpoint-down(xs) { - @include str-truncated($breadcrumb-max-width); - } - } - } - } -} diff --git a/app/assets/stylesheets/framework/broadcast_messages.scss b/app/assets/stylesheets/framework/broadcast_messages.scss index d5cd28718aa1..df5970b0e34d 100644 --- a/app/assets/stylesheets/framework/broadcast_messages.scss +++ b/app/assets/stylesheets/framework/broadcast_messages.scss @@ -41,12 +41,6 @@ } } -.toggle-colors { - input { - min-height: 34px; - } -} - .gl-broadcast-message-content p:last-child { margin: 0; } diff --git a/app/assets/stylesheets/framework/buttons.scss b/app/assets/stylesheets/framework/buttons.scss index 3bb484e665d6..616f54eecbf8 100644 --- a/app/assets/stylesheets/framework/buttons.scss +++ b/app/assets/stylesheets/framework/buttons.scss @@ -20,10 +20,6 @@ color: $text; border-color: $border; - &.btn-border-color { - border-color: $border-color; - } - > .icon { color: $text; } diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index 68f1452bebb8..e320aa7251e8 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -199,12 +199,6 @@ p.time { // Fix issue with notes & lists creating a bunch of bottom borders. li.note { img { max-width: 100%; } - - .note-title { - li { - border-bottom: 0 !important; - } - } } .markdown { @@ -287,6 +281,7 @@ li.note { } } +// these classes override styles from the dropzone node package .dropzone .dz-preview .dz-progress { border-color: $border-color !important; @@ -345,16 +340,6 @@ li.note { word-wrap: break-word; } -.checkbox-icon-inline-wrapper { - .checkbox { - display: inline; - - label { - display: inline; - } - } -} - /** COMMON CLASSES **/ /** 🚨 Do not use these classes — they are deprecated and being removed. 🚨 diff --git a/app/assets/stylesheets/framework/diffs.scss b/app/assets/stylesheets/framework/diffs.scss index 71d16b920190..c6629180e87b 100644 --- a/app/assets/stylesheets/framework/diffs.scss +++ b/app/assets/stylesheets/framework/diffs.scss @@ -82,11 +82,6 @@ $diff-file-header: 41px; cursor: pointer; } - .file-mode-changed { - padding: 10px; - @apply gl-text-subtle; - } - .suppressed-container { padding: ($padding-base-vertical + 5px) $padding-base-horizontal; text-align: center; @@ -455,12 +450,6 @@ table.code { span { white-space: break-spaces; - &.context-cell { - display: inline-block; - width: 100%; - height: 100%; - } - &.line { word-wrap: break-word; } @@ -820,10 +809,6 @@ table.code { &[aria-expanded="false"] { @apply gl-border-b; } - - .reply-author-avatar { - height: 1.5rem; - } } } } diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index 128755d59e88..113f2935850b 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -104,10 +104,6 @@ color: $gl-text-color !important; } - &.no-outline { - outline: 0; - } - &.large { width: 200px; } @@ -241,13 +237,6 @@ display: block; } } - - .icon-play { - fill: $gl-text-color-secondary; - margin-right: 6px; - height: 12px; - width: 11px; - } } .dropdown-menu { @@ -272,11 +261,6 @@ margin-bottom: $dropdown-vertical-offset; } - &.dropdown-open-left { - right: 0; - left: auto; - } - &.is-loading { .dropdown-content { display: none; @@ -360,12 +344,6 @@ text-transform: capitalize; } - .dropdown-bold-header { - font-weight: $gl-font-weight-bold; - line-height: $gl-line-height; - padding: $dropdown-item-padding-y $dropdown-item-padding-x; - } - .unclickable { cursor: not-allowed; padding: 5px 8px; @@ -376,10 +354,6 @@ // Expects up to 3 digits on the badge margin-right: 40px; } - - .dropdown-menu-content { - padding: $dropdown-item-padding-y $dropdown-item-padding-x; - } } .dropdown-item { @@ -462,10 +436,6 @@ } } -.dropdown-menu-large { - width: 340px; -} - .dropdown-menu-full-width { width: 100%; } @@ -537,7 +507,7 @@ li { a, button, - .dropdown-item:not(.open-with-link) { + .dropdown-item { padding: 8px 40px; position: relative; @@ -656,8 +626,7 @@ } } -.dropdown-input-field, -.default-dropdown-input { +.dropdown-input-field { background-color: $input-bg; display: block; width: 100%; @@ -808,31 +777,6 @@ } } -.dropdown-content-faded-mask { - position: relative; - - .dropdown-list { - max-height: $dropdown-max-height; - overflow-y: auto; - position: relative; - } - - &::after { - height: $dropdown-fade-mask-height; - width: 100%; - position: absolute; - bottom: 0; - background: linear-gradient(to top, $white 0, rgba($white, 0)); - transition: opacity $fade-mask-transition-duration $fade-mask-transition-curve; - content: ''; - pointer-events: none; - } - - &.fade-out::after { - opacity: 0; - } -} - .labels-select-wrapper { &.is-standalone { min-width: $input-md-width; diff --git a/app/assets/stylesheets/framework/vue_transitions.scss b/app/assets/stylesheets/framework/vue_transitions.scss index a9acb823cf30..563a1a8c717f 100644 --- a/app/assets/stylesheets/framework/vue_transitions.scss +++ b/app/assets/stylesheets/framework/vue_transitions.scss @@ -1,3 +1,8 @@ +/** +* Transition classes are built dynamically, please read about vue-transitions +* here before removing https://vuejs.org/guide/built-ins/transition +**/ + .fade-enter-active, .fade-leave-active, .fade-in-enter-active, -- GitLab