Skip to content

Commit

Permalink
attachment component print styles
Browse files Browse the repository at this point in the history
  • Loading branch information
matthillco committed Jun 25, 2024
1 parent b0ae32a commit 5e63d9f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,45 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
text-decoration: none;
cursor: help;
}

@include govuk-media-query($media-type: print) {
.gem-c-attachment {
display: flex;
flex-direction: row;
overflow: auto;
}

.gem-c-attachment__thumbnail {
flex-basis: 2cm;
margin-right: 5mm;

.govuk-link::after {
display: none;
}
}

.gem-c-attachment__thumbnail-image {
width: 15mm;
height: auto;
max-width: none;
aspect-ratio: 1 / 1.414;
}

.gem-c-attachment__details {
padding: 0;
}

.gem-c-attachment__link.govuk-link {
word-break: break-word;

&::after {
font-size: 12pt;
line-height: 1 !important; // stylelint-disable-line declaration-no-important
}
}

.gem-c-attachment__metadata,
.gem-c-attachment__metadata .govuk-link::after, {
font-size: 12pt;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
details_ga4_attributes ||= {}
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)

container_class_names = %w[gem-c-attachment govuk-!-display-none-print]
container_class_names = %w[gem-c-attachment]
container_class_names << shared_helper.get_margin_bottom if local_assigns.key?(:margin_bottom)
ga4_link = { 'event_name': 'navigation', 'type': 'attachment' }

Expand Down

0 comments on commit 5e63d9f

Please sign in to comment.