govuk_publishing_components 63.1.0 → 63.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d7be3bd8faf1d55b317bda8101dce15b87de9bc7ef96a090e8394d8f174442f
4
- data.tar.gz: 77796278e71f2963c5898e84f587ea9ba08bf599ff24a9a7a785aeda2d3d5226
3
+ metadata.gz: 69822fdce4a621596d707d34006154c108e1f98fceec83c42f2fb79e5a06c53a
4
+ data.tar.gz: 763173cb626bcde1135818f5d43998e2d8fab60e6e91b48ccfc4439d7a62361f
5
5
  SHA512:
6
- metadata.gz: 61d1ad004cbfbcc2eee95cfc4a17930fcb7d38c7bb20b7cbec01861d0aaf35975af38e08d91216a339a1cee6efb0a628acc658439518eb5225c05acf1182907e
7
- data.tar.gz: a2d709fbe8a6a84a7b0773db6f276d4a02595853039a6c0085a85c9536c048f47faf97ef7356ce7294e7f3e563b0f393505792b55c8dddcad59ac92580af535d
6
+ metadata.gz: ef764e6e4ae2bd257effc2830983fb388605ef4f1d4b0a2410b43835f67753cabbf6885fd7b65a0af14d7e22c64eb2703122f71e42fbceaf1ea8dadea120607d
7
+ data.tar.gz: 36d11809f4b629784cdafef3ebab1702c142657854adb31ccedc7443621fb1ad67c29c214540f7c7baa4c6351c1d09fd80b225e6583607b7e3dbc7a0493b9d78
@@ -5,6 +5,10 @@ $gap: govuk-spacing(1);
5
5
  .gem-c-figure {
6
6
  margin: 0;
7
7
  display: table;
8
+
9
+ &:has(img[src*=".svg"]) {
10
+ width: 100%;
11
+ }
8
12
  }
9
13
 
10
14
  .gem-c-figure__image {
@@ -20,3 +20,7 @@
20
20
  @include govuk-link-print-friendly;
21
21
  }
22
22
  }
23
+
24
+ .gem-c-notice__description {
25
+ word-wrap: break-word;
26
+ }
@@ -16,6 +16,10 @@
16
16
  margin: 0 0 govuk-spacing(4) 0;
17
17
  display: table;
18
18
 
19
+ &:has(img[src*=".svg"]) {
20
+ width: 100%;
21
+ }
22
+
19
23
  img {
20
24
  max-width: 100%;
21
25
  display: table-row;
@@ -26,6 +26,18 @@ examples:
26
26
  src: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/54374/s630_the_lords_chamber.jpg
27
27
  alt: An image of the lords chamber
28
28
  caption: The Lords Chamber on the 14th of August. A large number of people are in attendance, filling the seats in the lower and upper areas. Several people are wearing hats.
29
+ figure_with_caption_and_svg:
30
+ description: SVGs should behave like normal images, but will have a caption wider than the SVG if the SVG does not fill the available width (see following example for explanation).
31
+ data:
32
+ src: https://www.gov.uk/assets/frontend/govuk-crest-9f82a3631d8ac5feb4660345a2b44ca98f077b48248f2cc139a0f412355bebef.svg
33
+ alt: An image of the lords chamber
34
+ caption: The Lords Chamber on the 14th of August. A large number of people are in attendance, filling the seats in the lower and upper areas. Several people are wearing hats.
35
+ figure_with_caption_and_bad_svg:
36
+ description: This example shows an SVG containing a base64 encoded PNG image, instead of correct SVG elements. This was taken from a live GOV.UK page. We use the CSS `has` selector to ensure the containing figure has a width of 100%, otherwise it collapses to zero, making the image invisible. We can't distinguish between these kinds of SVGs, so all SVGs will have a full width caption as a consequence (see previous example).
37
+ data:
38
+ src: https://assets.publishing.service.gov.uk/media/693163e15b5198836f304041/01-fig1.svg
39
+ alt: An image of the lords chamber
40
+ caption: The Lords Chamber on the 14th of August. A large number of people are in attendance, filling the seats in the lower and upper areas. Several people are wearing hats.
29
41
  right_to_left_with_caption:
30
42
  data:
31
43
  src: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/image_data/file/31637/s300_Visas_-_Website.jpg
@@ -138,7 +138,7 @@ module GovukPublishingComponents
138
138
  def build_world_locations_path_for(link)
139
139
  if link["document_type"] == "world_location_news"
140
140
  link["base_path"]
141
- elsif link["document_type"] == "world_location" && link.dig("links", "world_location_news").any?
141
+ elsif link["document_type"] == "world_location" && link.dig("links", "world_location_news") && link.dig("links", "world_location_news").any?
142
142
  link.dig("links", "world_location_news", 0, "base_path")
143
143
  else
144
144
  slug = link["title"].parameterize
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "63.1.0".freeze
2
+ VERSION = "63.1.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 63.1.0
4
+ version: 63.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -2118,7 +2118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2118
2118
  - !ruby/object:Gem::Version
2119
2119
  version: '0'
2120
2120
  requirements: []
2121
- rubygems_version: 4.0.2
2121
+ rubygems_version: 4.0.3
2122
2122
  specification_version: 4
2123
2123
  summary: A gem to document components in GOV.UK frontend applications
2124
2124
  test_files: []