Skip to content

Commit

Permalink
Omit closing tag on void elements
Browse files Browse the repository at this point in the history
The self-closing / has no effect on the start tags of void elements in HTML5.

For this reason, we should standardise on omitting them.

https://html.spec.whatwg.org/dev/syntax.html#start-tags
#1122
  • Loading branch information
domoscargin committed Feb 20, 2023
1 parent bec07ac commit b07ccb4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions views/layouts/_generic.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<meta name="og:title" content="{{title}}">
<meta name="description" content="{{description}}">
<meta name="og:description" content="{{description}}">
<link rel="canonical" href="{{ canonical }}" />
<link rel="canonical" href="{{ canonical }}">
<!--[if lt IE 9]>
<link href="{{ getFingerprint('stylesheets/main-ie8.css') }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint('stylesheets/main-ie8.css') }}" rel="stylesheet" media="all">
<script src="{{ getFingerprint('javascripts/head-ie8.js') }}"></script>
<![endif]-->
<!--[if !IE 8]><!-->
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all">
<!--<![endif]-->
<script src="{{ getFingerprint('javascripts/vendor/modernizr.js') }}"></script>
{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions views/layouts/layout-example-full-page-govuk.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
{% block pageTitle %}{{ title }} – Example – GOV.UK Design System{% endblock %}
{% block head %}
<meta name="robots" content="noindex, nofollow">
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all">
{#- Include any additional stylesheets specified in the example frontmatter #}
{% for stylesheet in stylesheets %}
<link href="{{ getFingerprint(stylesheet) }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint(stylesheet) }}" rel="stylesheet" media="all">
{%- endfor %}
<!--[if lt IE 9]>
<script src="{{ getFingerprint('javascripts/head-ie8.js') }}"></script>
Expand Down
4 changes: 2 additions & 2 deletions views/layouts/layout-example-full-page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
{% block pageTitle %}{{ title }} – Example – GOV.UK Design System{% endblock %}
{% block head %}
<meta name="robots" content="noindex, nofollow">
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all">
{#- Include any additional stylesheets specified in the example frontmatter #}
{% for stylesheet in stylesheets %}
<link href="{{ getFingerprint(stylesheet) }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint(stylesheet) }}" rel="stylesheet" media="all">
{%- endfor %}
<!--[if lt IE 9]>
<script src="{{ getFingerprint('javascripts/head-ie8.js') }}"></script>
Expand Down
6 changes: 3 additions & 3 deletions views/layouts/layout-example.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<meta name="og:title" content="{{title}}">
<meta name="description" content="{{description}}">
<meta name="og:description" content="{{description}}">
<link rel="canonical" href="{{ canonical }}" />
<link rel="canonical" href="{{ canonical }}">

<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint('stylesheets/main.css') }}" rel="stylesheet" media="all">
{#- Include any additional stylesheets specified in the example frontmatter #}
{% for stylesheet in stylesheets %}
<link href="{{ getFingerprint(stylesheet) }}" rel="stylesheet" media="all" />
<link href="{{ getFingerprint(stylesheet) }}" rel="stylesheet" media="all">
{%- endfor %}

<!--[if lt IE 9]>
Expand Down
2 changes: 1 addition & 1 deletion views/partials/_image-card.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% macro imageCard(params) %}
<div class="app-image-card {{- ' app-image-card--large' if params.large }}">
<figure class="app-image-card__image-wrapper">
<img src="{{ params.src }}" alt="{{ params.alt }}" class="app-image--no-border" loading="lazy" />
<img src="{{ params.src }}" alt="{{ params.alt }}" class="app-image--no-border" loading="lazy">
</figure>
<div class="app-image-card__text">
<h3>{{ params.title }}</h3>
Expand Down

0 comments on commit b07ccb4

Please sign in to comment.