diff --git a/app/assets/stylesheets/govuk-component/_govspeak-print.scss b/app/assets/stylesheets/govuk-component/_govspeak-print.scss index 9233821f8..37603353c 100644 --- a/app/assets/stylesheets/govuk-component/_govspeak-print.scss +++ b/app/assets/stylesheets/govuk-component/_govspeak-print.scss @@ -2,4 +2,33 @@ .play-container { display: none; } + + .attachment { + margin: $gutter 0; + + &:first-child { + margin-top: 0; + } + + .attachment-thumb { + display: none; + } + + .attachment-details { + .download { + display: block; + } + } + + .accessibility-warning { + h2 { + @include core-14; + } + + .toggler { + display: none; + } + } + } + } diff --git a/app/assets/stylesheets/govuk-component/_govspeak.scss b/app/assets/stylesheets/govuk-component/_govspeak.scss index f9a5af736..cad442391 100644 --- a/app/assets/stylesheets/govuk-component/_govspeak.scss +++ b/app/assets/stylesheets/govuk-component/_govspeak.scss @@ -33,19 +33,6 @@ h3 { @include bold-19; margin-top: $gutter + 5px; - - &.hosted-externally { - @include bold-27; - padding-top: 2px; - - a { - text-decoration: none; - - &:hover { - text-decoration: underline; - } - } - } } h4 { @@ -413,4 +400,103 @@ .media-player { @include media-player; } + + // This block is duplicated from Whitehall as a transitional step, see the + // commit adding this warning before making changes, original version: + // https://github.com/alphagov/whitehall/blob/master/app/assets/stylesheets/frontend/helpers/_attachment.scss + $thumbnail-width: 99px; + + .attachment { + position: relative; + margin: $gutter 0; + padding: $gutter-half 0 0 ($thumbnail-width + $gutter); + @extend %contain-floats; + + &:first-child { + margin-top: 0; + padding-top: 0; + } + + .attachment-thumb { + $thumb-border-width: $gutter-one-third / 2; + + position: relative; + float: left; + margin-top: $thumb-border-width; + margin-left: -($thumbnail-width + $gutter - $thumb-border-width); + padding-bottom: $gutter-half; + + img { + display: block; + width: $thumbnail-width; + height: 140px; + background: $white; + outline: $thumb-border-width solid transparentize($black, 0.9); + + @include ie-lte(8) { + border: $thumb-border-width solid $grey-3; + } + + @include box-shadow(0 2px 2px rgba($black, .4)); + } + } + + .attachment-details { + h2 { + @include core-27; + margin: 0; + } + + p { + margin: $gutter-one-third 0; + } + + .metadata { + @include core-14; + } + + .changed, + .references, + .unnumbered-paper { + display: block; + } + + .preview, + .download { + @include core-19; + + strong { + font-weight: bold; + } + } + + .preview { + padding-right: $gutter-half; + } + + .opendocument-help { + @include core-14; + a { + @include external-link-14; + } + } + + .accessibility-warning { + h2 { + @include core-14; + margin: 0; + } + } + } + } + + &.direction-rtl .attachment { + padding: $gutter-half ($thumbnail-width + $gutter) 0 0; + + .attachment-thumb { + float: right; + margin-left: 0; + margin-right: (($thumbnail-width * -1) - $gutter-half); + } + } } diff --git a/app/views/govuk_component/docs/govspeak.yml b/app/views/govuk_component/docs/govspeak.yml index 59ac3b1de..e21e6f7dd 100644 --- a/app/views/govuk_component/docs/govspeak.yml +++ b/app/views/govuk_component/docs/govspeak.yml @@ -241,3 +241,173 @@ fixtures: + inline_attachment: + content: | +
testing my attachment
+ block_attachments: + content: | + works in the middle of copy. + + + + + + + + + + block_attachment_rtl: + direction: rtl + content: | +