diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index e92d55241d..e2cf57bfed 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -131,3 +131,28 @@ $govuk-include-default-font-face: false; width: 100%; } } + +.herotest--image-fade { + .herotest-additional-wrapper { + position: relative; + + &:before, + &:after { + content: ""; + position: absolute; + top: 0; + height: 100%; + width: 150px; + } + + &:before { + left: 0; + background: linear-gradient(90deg, rgba(177,180,182,1) 0%, rgba(2,0,36,0) 100%); + } + + &:after { + right: 0; + background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(177,180,182,1) 100%); + } + } +} \ No newline at end of file diff --git a/app/views/full_width_images/index.html.erb b/app/views/full_width_images/index.html.erb index d6798ec0bf..2b54359066 100644 --- a/app/views/full_width_images/index.html.erb +++ b/app/views/full_width_images/index.html.erb @@ -53,7 +53,7 @@
-

Full width with fixed height

+

Full width with fixed height (chosen option)

  • Good: height is fixed
  • @@ -88,4 +88,28 @@
+
+
+
+ <%= image_tag 'herotest.png', class: 'herotest-image', alt: '' %> +
+
+ +
+
+
+

Full width, fixed height, fade out

+

+
    +
  • Good: height is fixed
  • +
  • Good: position of content is known
  • +
  • Good: fade out helps reduce jarring edge of image on large screens
  • +
  • Bad: won't be full width on largest screens
  • +
  • Bad: image content is lost either side as browser gets narrower
  • +
+
+
+
+
+