Skip to content

Commit

Permalink
[MIM-2030] Mim 2030 print css (#3032)
Browse files Browse the repository at this point in the history
* MIM-2030: Started on print.css

* More styling print

* MIM-2030:Fjernet divider og litt mindre h1

* lint main.scss

* Some refactoring
  • Loading branch information
ssb-cgn authored Nov 19, 2024
1 parent 8f070c0 commit 641652b
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 2 deletions.
77 changes: 77 additions & 0 deletions src/main/resources/assets/styles/_print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@media print {
@page {
margin-top: 2rem !important;
}

body {
zoom: 70% !important;
}

.container {
width: 100% !important;
min-width: 992px !important;
}

.title-ingress-wrapper {
margin-top: 0rem !important;
padding-top: 0rem !important;

h1 {
font-size: 3rem;
}
}

// Hide from print
#breadcrumbs,
#popup,
#footer,
.global-links,
.header-content,
.hamburger,
.highcharts-exporting-group,
.mobileMenuDivider,
.show-datatable,
.part-related-articles,
.part-picture-card,
.part-related-external-links,
.part-related-statistics,
.part-divider,
.download-table-container {
display: none !important;
}

.highchart-wrapper {
margin-top: 0 !important;
}

// Avoid page-break
.highchart-wrapper,
.part-static-visualization,
.part-table,
img {
page-break-inside: avoid;
}

.article {
.associated-statistics,
.associated-article-archives {
display: none !important;
}

.ssb-expansion-box .content {
max-height: none;
opacity: 1;
}
}

.part-static-visualization {
.ssb-expansion-box .content {
max-height: none;
opacity: 1;
}

.ssb-tabs {
display: none !important;
}
}
}
8 changes: 6 additions & 2 deletions src/main/resources/assets/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ $container-max-widths: (
@import './statisticFigures';
@import './statisticDescription';
@import './statisticContact';
@import "./popup";
@import './popup';
@import './print';

body {
-moz-osx-font-smoothing: grayscale;
Expand Down Expand Up @@ -185,7 +186,8 @@ section.part-divider + section.part-divider {
.truncate-2-lines {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-line-clamp: 2;
/* number of lines to show */
-webkit-box-orient: vertical;
}

Expand All @@ -196,9 +198,11 @@ section.part-divider + section.part-divider {
opacity: 0;
transition: opacity 0.2s ease-in-out;
}

.anchor-wrapper {
border: none;
}

.anchor-wrapper:hover .link-anchor {
opacity: 1;
}
Expand Down

0 comments on commit 641652b

Please sign in to comment.