A platform for community discussion. Free, open, simple.
UX: Lighter style for category and tag dropdown nav
Krisd20a174a6b8e
diff --git a/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6 b/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6index 35f0e2adb33..a7b22c41075 100644--- a/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6+++ b/app/assets/javascripts/select-kit/components/category-drop/category-drop-header.js.es6@@ -4,12 +4,12 @@ import Category from "discourse/models/category";export default ComboBoxSelectBoxHeaderComponent.extend({layoutName:- "select-kit/templates/components/category-drop/category-drop-header",+ "select-kit/templates/components/category-drop/category-drop-header",classNames: "category-drop-header",-+classNameBindings: ["categoryStyleClass"],categoryStyleClass: Ember.computed.alias("site.category_style"),-+@computed("computedContent.value", "computedContent.name")category(value, name) {if (Ember.isEmpty(value)) {@@ -21,45 +21,42 @@ export default ComboBoxSelectBoxHeaderComponent.extend({return Category.findById(parseInt(value, 10));}},-+@computed("category.color")categoryBackgroundColor(categoryColor) {return categoryColor || "#e9e9e9";},-+@computed("category.text_color")categoryTextColor(categoryTextColor) {return categoryTextColor || "#333";},-+@computed("category", "categoryBackgroundColor", "categoryTextColor")categoryStyle(category, categoryBackgroundColor, categoryTextColor) {const categoryStyle = this.siteSettings.category_style;-+if (categoryStyle === "bullet") return;-+if (category) {if (categoryBackgroundColor || categoryTextColor) {let style = "";if (categoryBackgroundColor) {- if (categoryStyle === "bar") {- style += `border-color: #${categoryBackgroundColor};`;- } else if (categoryStyle === "box") {- style += `background-color: #${categoryBackgroundColor};`;+ if (categoryStyle === "box") {+ style += `border-color: #${categoryBackgroundColor}; background-color: #${categoryBackgroundColor};`;if (categoryTextColor) {style += `color: #${categoryTextColor};`;}- }+ }}-return style.htmlSafe();}}},-+didRender() {this._super();-+this.$().attr("style", this.get("categoryStyle"));this.$(".caret-icon").attr("style", this.get("categoryStyle"));}diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scssindex e365fbabf05..6fe89995f76 100644--- a/app/assets/stylesheets/common/base/_topic-list.scss+++ b/app/assets/stylesheets/common/base/_topic-list.scss@@ -15,9 +15,9 @@clear: both;margin-bottom: 5px;.combo-box .combo-box-header {- background: $primary-low;+ background: $secondary;color: $primary;- border: 1px solid transparent;+ border: 1px solid $primary-medium;padding: 5px 6px 5px 10px;font-size: $font-0;transition: none;diff --git a/app/assets/stylesheets/common/select-kit/category-drop.scss b/app/assets/stylesheets/common/select-kit/category-drop.scssindex e2b21056955..d61dccfa961 100644--- a/app/assets/stylesheets/common/select-kit/category-drop.scss+++ b/app/assets/stylesheets/common/select-kit/category-drop.scss@@ -15,7 +15,7 @@}&.bar.has-selection .category-drop-header {- border: none;+ padding: 4px 5px 4px 10px;}&.box.has-selection .category-drop-header {