From aee0a117a889461ce8ced6fcf73207fe017f1d99 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Dec 2021 13:37:47 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-6-stable-ee --- app/assets/stylesheets/pages/search.scss | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'app/assets/stylesheets/pages/search.scss') diff --git a/app/assets/stylesheets/pages/search.scss b/app/assets/stylesheets/pages/search.scss index 2e6c6a021f8..4c31cc6e111 100644 --- a/app/assets/stylesheets/pages/search.scss +++ b/app/assets/stylesheets/pages/search.scss @@ -321,6 +321,51 @@ input[type='checkbox']:hover { } } +// This overrides parts of the Project File View CSS +// We leverage most of the styling but broke off +// from how we were doing it in `shared/file_highlight` +#search-blob-content { + .line_holder { + pre { + padding: 0; // This overrides the existing style that will add space between each line. + } + + svg { + float: none; // We have more than one icon on this implementation and don't want to float them. + margin: 0; // We will manage the margin with GitLab UI utility classes + } + + .line-numbers { + padding: 0; // This overrides the existing style that will add space between each line. + min-width: 6.5rem; // Ensure our numbers fit + + .diff-line-num { + a { + transition: none; // There will be a hover transition from theme, blue, darkened + } + } + } + + &:hover { + svg { + visibility: visible; // We want to show the icons when the any part of the line is hovered + } + } + + // The icons only appear on hover + // So on mobile we can hide them and retake the space for the code blob + @include media-breakpoint-down(sm) { + svg { + display: none; + } + + .line-numbers { + min-width: 4rem; + } + } + } +} + // Disable webkit input icons, link to solution: https://stackoverflow.com/questions/9421551/how-do-i-remove-all-default-webkit-search-field-styling /* stylelint-disable property-no-vendor-prefix */ input[type='search']::-webkit-search-decoration, -- cgit v1.2.1