Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions _includes/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,25 +146,17 @@
font-size: 10px;
}
.license-rules:not(.license-rules-sidebar) li {
padding-left: 14px;
margin-right: 5px;
font-size: 10px;
-webkit-text-size-adjust: none;
}
.license-rules:not(.license-rules-sidebar) li span {
background-size: 44px;
.license-rules:not(.license-rules-sidebar) .license-marker {
width: 10px;
height: 10px;
font-size: 10px;
left: 0;
top: 1px;
position: relative;
}
.license-rules:not(.license-rules-sidebar) .license-conditions span {
background-position: -34px 0;
}
.license-rules:not(.license-rules-sidebar) .license-permissions span {
background-position: -24px 0px;
}
.license-rules:not(.license-rules-sidebar) .license-limitations span {
background-position: -14px 0;
position: absolute;
}

.hint--large::after{
Expand Down
2 changes: 1 addition & 1 deletion _includes/license-overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3 class="license-overview-name">
{% assign req = rule_obj.tag %}
{% if license[type] contains req %}
<li class="{{ req }}">
<span class="license-sprite"></span>
<span class="license-marker">{% if type == "permissions" %}✓{% elsif type == "conditions" %}ⓘ{% else %}✕{% endif %}</span>
{{ rule_obj.label }}
Comment on lines +36 to 37
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The marker glyph selection conditional is duplicated inline here (and also in other license templates). Consider computing the marker character once per type (or extracting to an include) and rendering a variable instead to avoid having to keep multiple copies in sync.

See below for a potential fix:

                {% assign marker = "✕" %}
                {% if type == "permissions" %}
                  {% assign marker = "✓" %}
                {% elsif type == "conditions" %}
                  {% assign marker = "ⓘ" %}
                {% endif %}
                {% assign rules = site.data.rules[type] | sort: "label" %}
                {% for rule_obj in rules %}
                  {% assign req = rule_obj.tag %}
                  {% if license[type] contains req %}
                    <li class="{{ req }}">
                      <span class="license-marker">{{ marker }}</span>

Copilot uses AI. Check for mistakes.
</li>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h4 id="optional-steps">Optional steps</h4>

<div class="source">
<a href="https://spdx.org/licenses/{{ page.spdx-id }}{% if lateronly %}-or-later{% endif %}.html">
<span class="license-sprite"></span>
<span class="source-marker" aria-hidden="true">↗</span>
Source
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% assign req = rule_obj.tag %}
{% if page[type] contains req %}
<li class="{{ req }}">
<span class="license-sprite"></span>
<span class="license-marker">{% if type == "permissions" %}✓{% elsif type == "conditions" %}ⓘ{% else %}✕{% endif %}</span>
{{ rule_obj.label }}
Comment on lines +35 to 36
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The marker glyph selection conditional is duplicated inline here. To improve maintainability, consider computing the marker character once per type (or extracting to an include) and rendering a variable instead, so future symbol changes only need to be made in one place.

See below for a potential fix:

                        {% assign marker = "" %}
                        {% if type == "permissions" %}
                          {% assign marker = "✓" %}
                        {% elsif type == "conditions" %}
                          {% assign marker = "ⓘ" %}
                        {% else %}
                          {% assign marker = "✕" %}
                        {% endif %}
                        {% for rule_obj in rules %}
                          {% assign req = rule_obj.tag %}
                          {% if page[type] contains req %}
                            <li class="{{ req }}">
                              <span class="license-marker">{{ marker }}</span>

Copilot uses AI. Check for mistakes.
</li>
{% endif %}
Expand Down
16 changes: 8 additions & 8 deletions appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
{% if r contains req %}
<td class="license-{{ t }}" style="text-align:center">
{% if r contains "--" %}
{% assign lite = " lite" %}
{% assign lite = "lite" %}
{% else %}
{% assign lite = "" %}
{% endif %}
<span class="{{ r | append: lite }}" style="margin: auto;">
<span class="license-sprite {{ r }}"></span>
<span class="{{ lite }}" style="margin: auto;">
<span class="license-marker {{ r }}">{% if t == "permissions" %}✓{% elsif t == "conditions" %}ⓘ{% else %}✕{% endif %}</span>
</span>
</td>
{% assign seen_req = true %}
Expand All @@ -66,11 +66,11 @@ If you're here to choose a license, **[start from the home page](/)** to see a f

## Legend

<p>Open source licenses grant to the public <span class="license-permissions"><span class="license-sprite"></span></span> <b>permissions</b> to do things with licensed works which copyright or other "intellectual property" laws might otherwise disallow.</p>
<p>Open source licenses grant to the public <span class="license-permissions"><span class="license-marker">✓</span></span> <b>permissions</b> to do things with licensed works which copyright or other "intellectual property" laws might otherwise disallow.</p>

<p>Most open source licenses' grants of permissions are subject to compliance with <span class="license-conditions"><span class="license-sprite"></span></span> <b>conditions</b>.</p>
<p>Most open source licenses' grants of permissions are subject to compliance with <span class="license-conditions"><span class="license-marker">ⓘ</span></span> <b>conditions</b>.</p>

<p>Most open source licenses also have <span class="license-limitations"><span class="license-sprite"></span></span> <b>limitations</b> that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.</p>
<p>Most open source licenses also have <span class="license-limitations"><span class="license-marker">✕</span></span> <b>limitations</b> that usually disclaim warranty and liability, and sometimes expressly exclude patents or trademarks from licenses' grants.</p>

{% for type in types %}
### {% if type == "permissions" %}Permissions{% elsif type == "conditions" %}Conditions{% else %}Limitations{% endif %}
Expand All @@ -85,8 +85,8 @@ If you're here to choose a license, **[start from the home page](/)** to see a f
{% else %}
{% assign lite = "" %}
{% endif %}
<span class="{{ req | append: lite }}">
<span class="license-sprite {{ req }}"></span>
<span class="{{ lite | strip }}">
<span class="license-marker {{ req }}">{% if type == "permissions" %}✓{% elsif type == "conditions" %}ⓘ{% else %}✕{% endif %}</span>
</span>
{{ rule_obj.description }}
</dd>
Expand Down
48 changes: 33 additions & 15 deletions assets/css/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ strong {
}

.license-rules li {
position: relative;
padding-left: 18px;
margin-right: 15px;
margin-bottom: 5px;
}
Expand All @@ -308,17 +310,39 @@ strong {
color: #444;
}

.license-sprite {
background-image: url(../img/license-sprite.png);
background-repeat: no-repeat;
.source-marker {
display: inline-block;
width: 16px;
text-align: center;
margin-right: 4px;
font-size: 0.875rem;
line-height: 1;
}

.license-marker {
display: inline-block;
width: 12px;
text-align: center;
font-weight: 700;
line-height: 1;
}

.license-rules li .license-marker {
position: absolute;
left: 0;
top: 0.1em;
}
.license-types td .license-marker { display: block; margin: 0 auto; }
.license-types td .license-marker,
.license-types dd .license-marker { font-size: 0.8125rem; }

.sidebar .source span { background-position: 0 0; width: 16px; height: 12px; }
.license-limitations span { background-position: -16px 0; width: 12px; height: 12px; }
.license-permissions span { background-position: -28px 0; width: 12px; height: 12px; }
.license-conditions span { background-position: -40px 0; width: 12px; height: 12px; }
.lite span { opacity: 0.5; }
.license-permissions .license-marker { color: #298625; }
.license-conditions .license-marker { color: #0d648a; }
.license-limitations .license-marker { color: #812a28; }

.license-permissions .lite .license-marker { color: rgba(41, 134, 37, 0.5); }
.license-conditions .lite .license-marker { color: rgba(13, 100, 138, 0.5); }
.license-limitations .lite .license-marker { color: rgba(129, 42, 40, 0.5); }

.license-rules-sidebar li {
float: none;
Expand Down Expand Up @@ -492,6 +516,7 @@ strong {
// Selecting all the tooltip bodies to increase their font-size
[class*="hint--"][aria-label]:after {
font-size: 0.80rem;
font-weight: 400;
text-shadow: none;
}

Expand Down Expand Up @@ -554,13 +579,6 @@ strong {
background-size: 72px 182px;
}

.license-sprite {
background-image: url(../img/license-sprite@2x.png);
-webkit-background-size: 52px 12px;
-moz-background-size: 52px 12px;
background-size: 52px 12px;
}

}

{% include css/responsive.css %}
Binary file removed assets/img/license-sprite.png
Binary file not shown.
Binary file removed assets/img/license-sprite@2x.png
Binary file not shown.
Loading