Skip to content

Commit

Permalink
Merge pull request #1257 from mschoettle/consistent-legend
Browse files Browse the repository at this point in the history
Show muted colors for conditions in legend
  • Loading branch information
mlinksva authored Nov 25, 2024
2 parents 62ec706 + 74b2b27 commit c973974
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
12 changes: 11 additions & 1 deletion appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,17 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
{% assign rs = site.data.rules[t] | sort: "label" %}
{% for r in rs %}
{% if r.tag == req %}
<dd class="license-{{t}}"><span class="license-sprite"></span> {{ r.description }}</dd>
{% if r.tag contains "--" %}
{% assign lite = " lite" %}
{% else %}
{% assign lite = "" %}
{% endif %}
<dd class="license-{{t}}">
<span class="{{ r.tag | append: lite }}">
<span class="license-sprite {{ r.tag }}"></span>
</span>
{{ r.description }}
</dd>
{% endif %}
{% endfor %}
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ strong {


/* Hint.css Overide */
.orverride-hint-inline {
.override-hint-inline {
display: block;
}

Expand Down
5 changes: 3 additions & 2 deletions assets/js/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ class Choosealicense
# Dynamically add annotations as title attribute to rule list items
for ruletype, rules of window.annotations
for rule in rules
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}")
# Only select license elements in table, not legend
licenseLiElement = $("td.license-#{ruletype} .#{rule["tag"]}")
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
licenseLiElement.addClass("hint--bottom
hint--large
hint--no-animate
#{tooltipAttr.color}
orverride-hint-inline")
override-hint-inline")

# Initializes Clipboard.js
initClipboard: ->
Expand Down

0 comments on commit c973974

Please sign in to comment.