Skip to content

Commit

Permalink
Merge pull request #1094 from webcompat/labels-contrast-color
Browse files Browse the repository at this point in the history
Fix #482 Labels contrast color and fix hover issues
  • Loading branch information
karlcow authored Jun 15, 2016
2 parents 8c1febc + 68d309c commit 20a3c70
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 35 deletions.
45 changes: 19 additions & 26 deletions webcompat/static/css/development/components/tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@
color:#404040;
}

/* event */
.wc-Tag--filter:hover,
.wc-Tag.is-active,
.wc-Tag-filter:focus {
color:#fff;
}

/* modifier */
.wc-tag--filter {
.wc-Tag--filter {
cursor:pointer;
}

Expand All @@ -45,8 +38,8 @@
}

/* event */
.wc-Tag--new.wc-tag--filter:hover
.wc-Tag--new.wc-tag--filter:focus,
.wc-Tag--new.wc-Tag--filter:hover,
.wc-Tag--new.wc-Tag--filter:focus,
.wc-Tag--new.is-active,
.wc-Tag--new.wc-Tag--label {
background-color:var(--base-stateNew);
Expand All @@ -58,8 +51,8 @@
}

/* event */
.wc-Tag--needsDiagnosis.wc-tag--filter:hover
.wc-Tag--needsDiagnosis.wc-tag--filter:focus,
.wc-Tag--needsDiagnosis.wc-Tag--filter:hover,
.wc-Tag--needsDiagnosis.wc-Tag--filter:focus,
.wc-Tag--needsDiagnosis.is-active,
.wc-Tag--needsDiagnosis.wc-Tag--label {
background-color:var(--base-stateNeedsDiagnosis);
Expand All @@ -71,8 +64,8 @@
}

/* event */
.wc-Tag--needsContact.wc-tag--filter:hover,
.wc-Tag--needsContact.wc-tag--filter:focus,
.wc-Tag--needsContact.wc-Tag--filter:hover,
.wc-Tag--needsContact.wc-Tag--filter:focus,
.wc-Tag--needsContact.is-active,
.wc-Tag--needsContact.wc-Tag--label {
background-color:var(--base-stateNeedsContact);
Expand All @@ -84,8 +77,8 @@
}

/* event */
.wc-Tag--ready.wc-tag--filter:hover,
.wc-Tag--ready.wc-tag--filter:focus,
.wc-Tag--ready.wc-Tag--filter:hover,
.wc-Tag--ready.wc-Tag--filter:focus,
.wc-Tag--ready.is-active,
.wc-Tag--ready.wc-Tag--label {
background-color:var(--base-stateReady);
Expand All @@ -97,8 +90,8 @@
}

/* event */
.wc-Tag--sitewait.wc-tag--filter:hover,
.wc-Tag--sitewait.wc-tag--filter:focus,
.wc-Tag--sitewait.wc-Tag--filter:hover,
.wc-Tag--sitewait.wc-Tag--filter:focus,
.wc-Tag--sitewait.is-active,
.wc-Tag--sitewait.wc-Tag--label {
background-color:var(--base-stateSitewait);
Expand All @@ -110,8 +103,8 @@
}

/* event */
.wc-Tag--close.wc-tag--filter:hover,
.wc-Tag--close.wc-tag--filter:focus,
.wc-Tag--close.wc-Tag--filter:hover,
.wc-Tag--close.wc-Tag--filter:focus,
.wc-Tag--close.is-active,
.wc-Tag--close.wc-Tag--label {
background-color:var(--base-stateClose);
Expand All @@ -123,22 +116,22 @@
}

/* event */
.wc-Tag--fixed.wc-tag--filter:hover,
.wc-Tag--fixed.wc-tag--filter:focus,
.wc-Tag--fixed.wc-Tag--filter:hover,
.wc-Tag--fixed.wc-Tag--filter:focus,
.wc-Tag--fixed.is-active,
.wc-Tag--fixed.wc-Tag--label {
background-color:var(--base-stateFixed);
}

/* Tag Appears to work */
.wc-Tag--worksforme {
border-color:var(--base-stateWorksForMe);
}

/* event */
.wc-Tag--worksforme.wc-tag--filter:hover,
.wc-Tag--worksforme.wc-tag--filter:focus,
.wc-Tag--worksforme.wc-Tag--filter:hover,
.wc-Tag--worksforme.wc-Tag--filter:focus,
.wc-Tag--worksforme.is-active,
.wc-Tag--worksforme.wc-Tag--label {
background-color:var(--base-stateWorksForMe);
}
}
20 changes: 11 additions & 9 deletions webcompat/templates/web_modules/tag.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{% macro tag(type, category) %}

{% if type == 'filter' %}
{% if type == 'filter' %}

<button
type="button"
class="wc-Tag wc-Tag--filter wc-Tag--{{ category.name }} r-ResetButton js-Tag"
data-filter="{{ category.dataAttribute }}"
>
<span class="wc-Tag-count"></span> {{ category.label }}</span>
</button>

<button type="button" class="wc-Tag wc-tag--filter wc-Tag--{{ category.name }} r-ResetButton js-Tag" data-filter="{{ category.dataAttribute }}">
<span class="wc-Tag-count"></span> {{ category.label }}</span>
</button>
{% elif type == 'tag' %}

{% elif type == 'tag' %}
<div class="wc-Tag wc-Tag--label wc-Tag--<%= stateClass %>"><%= issueState %></div>

<div class="wc-Tag wc-Tag--label wc-Tag--<%= stateClass %>"><%= issueState %></div>


{% endif %}
{% endif %}
{% endmacro %}

0 comments on commit 20a3c70

Please sign in to comment.