From 600b17cd9f1b05e6e115a814ba01571056289e95 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 26 Oct 2018 23:39:11 -0500 Subject: [PATCH] Fix #3961: Tags in dialog boxes sometimes colored incorrectly Fix rules so that the `.ui-widget-content .category-0 a` rule for tags overrides the `.ui-widget-content a` rule for normal links. --- .../src/styles/common/jquery_ui_custom.scss | 12 ++++++------ app/javascript/src/styles/common/tags.scss.erb | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/javascript/src/styles/common/jquery_ui_custom.scss b/app/javascript/src/styles/common/jquery_ui_custom.scss index 07cacfebd..2712e48a3 100644 --- a/app/javascript/src/styles/common/jquery_ui_custom.scss +++ b/app/javascript/src/styles/common/jquery_ui_custom.scss @@ -6,14 +6,14 @@ input, select, textarea, button { font-family: $base_font_family; } +} - a, a:active, a:visited { - color: $link_color; - } +.ui-widget-content a { + color: $link_color; +} - a:hover { - color: $link_hover_color; - } +.ui-widget-content a:hover { + color: $link_hover_color; } div.ui-dialog { diff --git a/app/javascript/src/styles/common/tags.scss.erb b/app/javascript/src/styles/common/tags.scss.erb index 51d17919e..78bd70d0e 100644 --- a/app/javascript/src/styles/common/tags.scss.erb +++ b/app/javascript/src/styles/common/tags.scss.erb @@ -1,7 +1,10 @@ @import "../base/000_vars.scss"; <% TagCategory.css_mapping.each do |category,cssmap| %> - .category-<%= category %> a, a.tag-type-<%= category %>, .ui-widget-content a.tag-type-<%= category %> { + .category-<%= category %> a, + a.tag-type-<%= category %>, + .ui-widget-content .category-<%= category %> a, + .ui-widget-content a.tag-type-<%= category %> { color: <%= cssmap["color"] %>; &:link, &:visited {