diff --git a/app/assets/stylesheets/shared/recommended_index.scss b/app/assets/stylesheets/shared/recommended_index.scss index 0f581cb67..2c45d19b4 100644 --- a/app/assets/stylesheets/shared/recommended_index.scss +++ b/app/assets/stylesheets/shared/recommended_index.scss @@ -17,10 +17,24 @@ } ul { + display: grid; font-weight: bold; + grid-auto-rows: 1fr; + grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); list-style: none; margin: 0; + @include breakpoint(medium) { + + * { + text-align: $global-right; + } + } + + > li, + + * { + @include grid-column-gutter; + } + > li { margin-bottom: calc($line-height / 4); } @@ -52,9 +66,13 @@ line-height: inherit; position: absolute; right: 12px; - top: -18px; + top: 0; z-index: 2; + @include breakpoint(medium) { + top: -18px; + } + &:focus, &:hover { @include anchor-color-hover; diff --git a/app/components/shared/recommended_index_component.html.erb b/app/components/shared/recommended_index_component.html.erb index 20fbc176c..a535dcbfc 100644 --- a/app/components/shared/recommended_index_component.html.erb +++ b/app/components/shared/recommended_index_component.html.erb @@ -1,34 +1,30 @@