Skip to content

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

DEV: Use where selector for modernization of foundation theme (#41717)

Jordan Vidrine88dd3151fe87
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss
index 51607cfcd3d..52d8e2f3b6d 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/buttons-controls.scss
@@ -1,6 +1,6 @@
@use "lib/viewport";
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
--d-button-default-bg-color: var(--secondary);
--d-button-default-border: 1px solid var(--primary-300);
--d-button-default-border--hover: 1px solid var(--primary-400);
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/calendar.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/calendar.scss
index 2f479bc2daa..aa442e508fc 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/calendar.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/calendar.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.fc .fc-button-primary {
--fc-button-bg-color: var(--secondary);
--fc-button-border-color: var(--primary-200);
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/categories.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/categories.scss
index c2c5c6afa16..c4b5ee1cbe9 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/categories.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/categories.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
--category-boxes-text-alignment: left;
--category-boxes-description-text-color: var(--primary-700);
--d-category-boxes-gap: var(--space-4);
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/chat.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/chat.scss
index 177d31552cb..ff46d609745 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/chat.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/chat.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.c-navbar {
align-items: center;
}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss
index 2d1a6017e28..0157efd2c4f 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/groups.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.group-details-container {
background: transparent;
border: 1px solid var(--content-border-color);
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/header.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/header.scss
index 5912dd8651a..755120ee832 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/header.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/header.scss
@@ -1,6 +1,6 @@
@use "lib/viewport";
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.d-header {
height: 3.25em;
}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/misc.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/misc.scss
index 021c7c5e774..44a45d3c1c7 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/misc.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/misc.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.discourse-reactions-counter .reactions-counter {
align-items: center;
}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/nav-pills.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/nav-pills.scss
index 438ed3dc7eb..b944a7bf742 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/nav-pills.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/nav-pills.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.nav-pills > li > a:hover::after,
.nav-pills > li button:hover::after {
content: "";
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss
index 84f10a8e96a..eb50d4c55a2 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/select-kit.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
.select-kit.is-expanded .select-kit-filter.is-expanded {
border: none;
}
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/sidebar.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/sidebar.scss
index f1b3f1b2cfc..966bfe9ada7 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/sidebar.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/sidebar.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
--sidebar-section-wrapper-padding: var(--main-outlet-padding-top)
var(--space-2) var(--space-4);
--d-sidebar-active-background: var(--token-color-surface-hovered);
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/topic-list.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/topic-list.scss
index 8aade41b772..a139e49746d 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/topic-list.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/topic-list.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
--d-table-border-top-height: 1px;
--d-topic-list-data-font-size: var(--font-down-1);
--d-topic-list-header-text-color: var(--primary-900);
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/variables.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/variables.scss
index acc7c9ef5a0..bb25c82d7d6 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/variables.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/variables.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme {
+:where(.uc-modernize-foundation-theme) {
// New Variables
--webkit-font-smoothing: antialiased;
--welcome-banner-text-align: center;
diff --git a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/welcome-banner.scss b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/welcome-banner.scss
index c5c68a20af2..226c83b49eb 100644
--- a/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/welcome-banner.scss
+++ b/app/assets/stylesheets/common/base/uc-modernize-foundation-theme/welcome-banner.scss
@@ -1,4 +1,4 @@
-.uc-modernize-foundation-theme .welcome-banner {
+:where(.uc-modernize-foundation-theme) .welcome-banner {
padding-block: var(--d-main-content-gap);
&__wrap .search-menu {