Skip to content

Commit c973974

Browse files
authored
Merge pull request #1257 from mschoettle/consistent-legend
Show muted colors for conditions in legend
2 parents 62ec706 + 74b2b27 commit c973974

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

appendix.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,17 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
8888
{% assign rs = site.data.rules[t] | sort: "label" %}
8989
{% for r in rs %}
9090
{% if r.tag == req %}
91-
<dd class="license-{{t}}"><span class="license-sprite"></span> {{ r.description }}</dd>
91+
{% if r.tag contains "--" %}
92+
{% assign lite = " lite" %}
93+
{% else %}
94+
{% assign lite = "" %}
95+
{% endif %}
96+
<dd class="license-{{t}}">
97+
<span class="{{ r.tag | append: lite }}">
98+
<span class="license-sprite {{ r.tag }}"></span>
99+
</span>
100+
{{ r.description }}
101+
</dd>
92102
{% endif %}
93103
{% endfor %}
94104
{% endfor %}

assets/css/application.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ strong {
464464

465465

466466
/* Hint.css Overide */
467-
.orverride-hint-inline {
467+
.override-hint-inline {
468468
display: block;
469469
}
470470

assets/js/app.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ class Choosealicense
4040
# Dynamically add annotations as title attribute to rule list items
4141
for ruletype, rules of window.annotations
4242
for rule in rules
43-
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}")
43+
# Only select license elements in table, not legend
44+
licenseLiElement = $("td.license-#{ruletype} .#{rule["tag"]}")
4445
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
4546
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
4647
licenseLiElement.addClass("hint--bottom
4748
hint--large
4849
hint--no-animate
4950
#{tooltipAttr.color}
50-
orverride-hint-inline")
51+
override-hint-inline")
5152

5253
# Initializes Clipboard.js
5354
initClipboard: ->

0 commit comments

Comments
 (0)