diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss index 7ec53b6a6..510897ccd 100644 --- a/app/assets/stylesheets/projects.scss +++ b/app/assets/stylesheets/projects.scss @@ -762,8 +762,6 @@ li.module-hover { } .projects-toolbar { - margin-bottom: 1em; - .form-group { width: 100%; } @@ -1157,10 +1155,14 @@ li.module-hover { display: flex; height: 3em; padding: 0 .5em; + position: sticky; + position: -webkit-sticky; + top: 13em; + width: calc(100% + 1em); + z-index: 2; &.select-all-checkboxes { justify-content: center; - position: relative; } } diff --git a/app/assets/stylesheets/repositories.scss b/app/assets/stylesheets/repositories.scss index 52bfda1cf..933e68afd 100644 --- a/app/assets/stylesheets/repositories.scss +++ b/app/assets/stylesheets/repositories.scss @@ -31,66 +31,70 @@ #repository-toolbar { - align-items: center; - background-color: $color-white; - border: 0; - display: flex; - left: var(--repository-sidebar-margin); - padding: 0 2em; - position: fixed; - transition: .4s $timing-function-sharp; - width: calc(100% - var(--repository-sidebar-margin)); - z-index: 100; - - .toolbar-delimiter { - border-bottom: $border-tertiary; - bottom: 0; - position: absolute; - width: calc(100% - 4em); - } - - .repository-share-icon { - flex-shrink: 0; - margin-top: -2px; - - .fas-custom { - margin-left: 5px; - } - } - - .dropdown-menu { - @include font-button; - } - - .repository-title-name { - @include font-h2; + .title-row { + align-items: center; + background-color: $color-white; + border: 0; display: flex; - flex-direction: column; - flex-grow: 1; - line-height: 32px; - margin-right: 20px; - overflow: hidden; - padding-left: 5px; - text-overflow: ellipsis; - white-space: nowrap; + left: var(--repository-sidebar-margin); + margin-left: 0em; + padding: 0 2em; + position: fixed; + transition: .4s $timing-function-sharp; + width: calc(100% - var(--repository-sidebar-margin)); + z-index: 100; - .name-container { - align-items: center; - display: inline-flex; - height: 32px; - margin: 0; + .toolbar-delimiter { + border-bottom: $border-tertiary; + bottom: 0; + margin-left: -2em; + position: absolute; + width: 100%; + } - .read-only-name { - display: inline-block; - line-height: 32px; - max-width: calc(100% - 30px); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + .repository-share-icon { + flex-shrink: 0; + margin-top: -2px; + + .fas-custom { + margin-left: 5px; } + } - .inline-editing-container { - width: 100%; + .dropdown-menu { + @include font-button; + } + + .repository-title-name { + @include font-h2; + display: flex; + flex-direction: column; + flex-grow: 1; + line-height: 32px; + margin-right: 20px; + overflow: hidden; + padding-left: 5px; + text-overflow: ellipsis; + white-space: nowrap; + + .name-container { + align-items: center; + display: inline-flex; + height: 32px; + margin: 0; + + .read-only-name { + display: inline-block; + line-height: 32px; + max-width: calc(100% - 30px); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .inline-editing-container { + width: 100%; + } } } } diff --git a/app/assets/stylesheets/shared/content_pane.scss b/app/assets/stylesheets/shared/content_pane.scss index c59bb0d79..f9a950c0a 100644 --- a/app/assets/stylesheets/shared/content_pane.scss +++ b/app/assets/stylesheets/shared/content_pane.scss @@ -1,3 +1,6 @@ +// scss-lint:disable SelectorDepth SelectorFormat +// scss-lint:disable NestingDepth QualifyingElement + .content-pane { background-color: $color-white; margin: 20px 0; @@ -9,50 +12,68 @@ } .content-header { - align-items: center; - border-bottom: $border-tertiary; - display: flex; - height: 5em; - - h1 { - flex-grow: 1; - margin: 0; + &.sticky-header { + background: $color-white; + position: sticky; + position: -webkit-sticky; + top: var(--navbar-height); + z-index: 10; } - .view-switch { - margin-left: auto; + .title-row { + align-items: center; + border-bottom: $border-tertiary; + display: flex; + height: 5em; + margin-left: -2em; + padding-left: 2em; + width: calc(100% + 4em); - .caret { - margin: 8px 0 8px 8px; + h1 { + flex-grow: 1; + margin: 0; } - &.open { + + .view-switch { + margin-left: auto; + .caret { - transform: rotateX(180deg) + margin: 8px 0 8px 8px; } - } - .dropdown-menu { - @include font-button; - min-width: auto; - - li { - cursor: pointer; - padding: 1em; - white-space: nowrap; - - .button-icon { - margin-right: .5em; + &.open { + .caret { + transform: rotateX(180deg); } + } - &:hover { - background: $color-concrete; + .dropdown-menu { + @include font-button; + min-width: auto; + + li { + cursor: pointer; + padding: 1em; + white-space: nowrap; + + .button-icon { + margin-right: .5em; + } + + &:hover { + background: $color-concrete; + } } } } } - } - - .content-body { + .toolbar-row { + border-bottom: $border-tertiary; + margin-left: -2em; + padding: 1em 0; + padding-left: 2em; + width: calc(100% + 4em); + } } } diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 6a1b79307..f206db305 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -21,9 +21,7 @@ <%= render partial: 'projects/index/modals/export_projects' %>