Skip to content

A platform for community discussion. Free, open, simple.

UX: fix alignment of more topics nav pills (#32808)

Krisbbb958313135
diff --git a/app/assets/stylesheets/common/components/more-topics.scss b/app/assets/stylesheets/common/components/more-topics.scss
index f9e5bbd9bc1..9856f82d79b 100644
--- a/app/assets/stylesheets/common/components/more-topics.scss
+++ b/app/assets/stylesheets/common/components/more-topics.scss
@@ -1,3 +1,5 @@
+@use "lib/viewport";
+
.more-topics__container {
position: relative;
padding-bottom: max(env(safe-area-inset-bottom), 1em);
@@ -5,21 +7,22 @@
.nav {
margin-block: 0;
- top: 2px;
+
+ @include viewport.until(lg) {
+ font-size: var(--font-down-1);
+ }
li {
.btn {
color: var(--primary);
background-color: transparent;
- padding: 0.5em 5px;
+ padding: calc(0.8em - var(--d-nav-underline-height)) 0.8em; // match th block padding minus border
border-radius: 0;
- &:hover {
- box-shadow: inset 0 -3px 0 0 rgba(var(--tertiary-rgb), 0.5);
- }
-
- &.active {
- box-shadow: inset 0 -3px 0 0 var(--tertiary);
+ .discourse-no-touch & {
+ &:hover {
+ background: var(--d-hover);
+ }
}
.d-icon,
diff --git a/app/assets/stylesheets/desktop/components/more-topics.scss b/app/assets/stylesheets/desktop/components/more-topics.scss
index 0fafcb6e30a..494318db676 100644
--- a/app/assets/stylesheets/desktop/components/more-topics.scss
+++ b/app/assets/stylesheets/desktop/components/more-topics.scss
@@ -8,7 +8,6 @@
.btn {
font-size: var(--font-0);
line-height: var(--line-height-large);
- padding: 0.75em 0.65em;
}
}
}
diff --git a/app/assets/stylesheets/mobile/components/more-topics.scss b/app/assets/stylesheets/mobile/components/more-topics.scss
index 25af96fc3b0..f530c23e642 100644
--- a/app/assets/stylesheets/mobile/components/more-topics.scss
+++ b/app/assets/stylesheets/mobile/components/more-topics.scss
@@ -2,6 +2,11 @@
.nav {
margin-block: 0 7px;
border-bottom: 1px solid var(--primary-low);
+
+ li {
+ position: relative;
+ bottom: -1px; // compensate for the border-bottom
+ }
}
.more-content-topics {