Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Standardise look of Select2 & other selects.

Matthew Kennedye0438b55e278
diff --git a/backend/app/assets/stylesheets/spree/backend/components/_filters.scss b/backend/app/assets/stylesheets/spree/backend/components/_filters.scss
index b2c979aee1..0a24c98b33 100644
--- a/backend/app/assets/stylesheets/spree/backend/components/_filters.scss
+++ b/backend/app/assets/stylesheets/spree/backend/components/_filters.scss
@@ -18,6 +18,12 @@
opacity: 0.1;
}
+i.js-delete-filter {
+ width: $select2-icon-size;
+ height: $select2-icon-size;
+ margin-bottom: 0;
+}
+
.index-filter-button {
font-size: $font-size-sm;
@@ -53,7 +59,8 @@
height: 0.8rem;
}
- svg.default-filter-arrow{
+
+ svg.default-filter-arrow {
opacity: 0.1;
}
}
diff --git a/backend/app/assets/stylesheets/spree/backend/global/_variables.scss b/backend/app/assets/stylesheets/spree/backend/global/_variables.scss
index 5883e48df1..4180b97a68 100644
--- a/backend/app/assets/stylesheets/spree/backend/global/_variables.scss
+++ b/backend/app/assets/stylesheets/spree/backend/global/_variables.scss
@@ -31,3 +31,8 @@
Forms
-----------------------------------------*/
$label-margin-bottom: 0;
+
+/*------------------------------------------
+ Plugins
+ -----------------------------------------*/
+ $select2-icon-size: 0.7rem;
diff --git a/backend/app/assets/stylesheets/spree/backend/plugins/_select2.scss b/backend/app/assets/stylesheets/spree/backend/plugins/_select2.scss
index 2bfbef5f15..6cd4be82eb 100644
--- a/backend/app/assets/stylesheets/spree/backend/plugins/_select2.scss
+++ b/backend/app/assets/stylesheets/spree/backend/plugins/_select2.scss
@@ -21,10 +21,8 @@ div.select2-drop-mask {
.select2-arrow {
background-image: none;
background-color: $input-bg;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
- border-left-color: $input-border-color;
- width: 24px;
+ border:none;
+ width: 30px;
b {
background-image: url(asset-path("backend-chevron-down.svg")) !important;
@@ -32,7 +30,7 @@ div.select2-drop-mask {
vertical-align: middle !important;
background-repeat: no-repeat !important;
background-size: 1rem !important;
- background-position: 54% !important;
+ background-position: 48% !important;
}
}
@@ -166,7 +164,7 @@ div.select2-drop-mask {
.select2-search-choice-close,
.select2-container .select2-choice abbr,
.select2-container .select2-choice .select2-arrow b {
- background-size: 0.7rem !important;
+ background-size: $select2-icon-size !important;
}
.select2-container.select2-allowclear .select2-choice abbr{
@@ -176,7 +174,7 @@ div.select2-drop-mask {
background-repeat: no-repeat !important;
background-position: 50% !important;
right:30px;
- background-size: 0.8rem !important;
+ background-size: $select2-icon-size !important;
}
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
@@ -191,9 +189,3 @@ select.select2[required="required"] {
opacity:0;
filter:alpha(opacity=0);
}
-
-i.js-delete-filter {
- width: 0.8rem;
- height: 0.8rem;
- margin-bottom: 0;
-}