Skip to content

REFACTOR: move mobile list-controls.scss to common #32862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/assets/stylesheets/common/base/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
@import "history";
@import "json_schema";
@import "lightbox";
@import "list-controls";
@import "login";
@import "login-signup-page";
@import "magnific-popup";
Expand Down
45 changes: 0 additions & 45 deletions app/assets/stylesheets/common/base/_topic-list.scss
Original file line number Diff line number Diff line change
@@ -1,50 +1,5 @@
@use "lib/viewport";

// Topic list navigation & controls
.list-controls {
background: var(--d-content-background);

.combo-box .combo-box-header {
background: var(--secondary);
color: var(--primary);
border: 1px solid var(--primary-medium);
font-size: var(--font-0);
height: 100%;

&:focus {
border-color: var(--tertiary);
}
}

.select-kit {
.select-kit-collection {
max-height: 40vh;
}
}
}

.navigation-container {
width: 100%;
display: flex;
flex-wrap: wrap;
}

.category-breadcrumb {
display: flex;
flex-wrap: wrap;
gap: var(--nav-space) 0; // used if the breadcrumb dropdowns wrap
list-style: none;
padding: 0;
margin: 0 0 var(--nav-space) 0;

> li {
// only target the top-level li, not dropdowns
display: flex;
margin-right: 0.5em;
margin-bottom: 0;
}
}

#navigation-bar {
display: flex;
flex-wrap: wrap;
Expand Down
100 changes: 100 additions & 0 deletions app/assets/stylesheets/common/base/list-controls.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
@use "lib/viewport";

// Topic list navigation & controls
.list-controls {
background: var(--d-content-background);

@include viewport.until(sm) {
.container {
display: flex;
flex-wrap: wrap;
align-items: center;
}
}

.combo-box .combo-box-header {
background: var(--secondary);
color: var(--primary);
border: 1px solid var(--primary-medium);
font-size: var(--font-0);
height: 100%;

&:focus {
border-color: var(--tertiary);
}
}

.select-kit {
.select-kit-collection {
max-height: 40vh;
}
}
}

.navigation-container {
width: 100%;
display: flex;
flex-wrap: wrap;
}

.category-breadcrumb {
display: flex;
flex-wrap: wrap;
gap: var(--nav-space) 0; // used if the breadcrumb dropdowns wrap
list-style: none;
padding: 0;
margin: 0 0 var(--nav-space) 0;

> li {
// only target the top-level li, not dropdowns
display: flex;
margin-right: 0.5em;
margin-bottom: 0;
}
}

.mobile-view {
.list-controls {
#create-topic {
box-sizing: border-box;
display: flex;
align-self: stretch;
align-items: center;
}
}

.list-control-toggle-link-trigger {
font-size: var(--font-up-1-rem);
font-weight: bold;
color: var(--primary-high);
padding: 0;

&:hover,
&:focus {
background: none;
}

.d-icon {
color: inherit;
font-size: var(--font-down-2);
margin-left: 0.5em;
}
}

.fk-d-menu-modal.list-control-toggle-link-content {
.dropdown-menu {
display: flex;
flex-direction: column;

a {
display: block;
color: var(--primary);

&.active {
background: var(--d-selected);
font-weight: bold;
}
}
}
}
}
1 change: 0 additions & 1 deletion app/assets/stylesheets/mobile/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import "list-controls";
@import "login-signup-page";
@import "menu-panel";
@import "modal";
Expand Down
81 changes: 0 additions & 81 deletions app/assets/stylesheets/mobile/list-controls.scss

This file was deleted.

4 changes: 4 additions & 0 deletions app/assets/stylesheets/mobile/topic-list.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// --------------------------------------------------
// Topic lists
// --------------------------------------------------
.list-container .full-width {
margin-left: 0;
}

.topic-list {
&-body {
border-width: 1px;
Expand Down
Loading