govuk_publishing_components 63.1.1 → 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: d4f4bddddd59ab4acdd36e889516a641e771dba63fc265299ea220d6d51b2aff
4
- data.tar.gz: 99a65a11c3292dfb5114513f828319b8d91b0ba9b3a532c9b009ca0a9bf06f65
3
+ metadata.gz: 69822fdce4a621596d707d34006154c108e1f98fceec83c42f2fb79e5a06c53a
4
+ data.tar.gz: 763173cb626bcde1135818f5d43998e2d8fab60e6e91b48ccfc4439d7a62361f
5
5
  SHA512:
6
- metadata.gz: 83667e64ed8684f334895a638f67953de738140a133dc53f8c692b3130df1fed34c17020c8c3bd1a6dbb386f0f4ebe5592bb8b6534a97d0444a5583a42a0854f
7
- data.tar.gz: a8af80d3b6e7629047e4803e4e70a0a1024fc495718014b4895eac53d738ceac829d56698eb150a29760c854d60282709d318d9c957f45cbf03ad66743d228bd
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 {
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "63.1.1".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.1
4
+ version: 63.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev