Skip to content

Commit

Permalink
fix: updated print styles (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraBianchi authored Dec 20, 2024
1 parent 6282e2b commit 2374b47
Show file tree
Hide file tree
Showing 9 changed files with 410 additions and 106 deletions.
23 changes: 7 additions & 16 deletions src/theme/ItaliaTheme/Blocks/_contacts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,48 +91,39 @@
}

.contact-title {

margin-bottom: 1rem;
font-size: 1.35rem;
font-weight: bold;
line-height: 1.4em;

margin-bottom: 1rem;
}

.contact-text {
font-size: 0.9rem;

.detached-slate-editor {
margin-bottom: 1rem;
}
}

.contact-info {
display: flex;

&:first-of-type {
align-items: center;

.icon-wrapper {
margin-top: 0;
}
}

&:not(:last-of-type) {
margin-bottom: 1rem;
}
align-items: center;

[role='textbox'] {
//slate editor
width: 100%;

&[data-slate-editor='true'] {
min-height: 1em;
}
}

.icon-wrapper {
margin-top: 0.2rem;
margin-right: 1rem;
display: flex;
align-items: center;
margin-top: 0.2rem;
margin-right: 1rem;
}

.tel {
Expand Down
107 changes: 85 additions & 22 deletions src/theme/ItaliaTheme/Print/_all_pages.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
@media print {
@page {
margin: 0.2cm; /* 1 inch margin for all sides */
margin: 0 !important;
}

body {
display: block !important;
}

.public-ui {
h2 {
font-size: 1.5rem;
}
}

.public-ui {
// removed underlining from links
a {
font-weight: 600 !important;
text-decoration: none !important;
// text-decoration: none !important;
/* i link che non devono essere sottolineati hanno già regole specifiche,
a video è necessario mostare che i tag a sono link */

&.read-more {
display: none !important; // omesso il read more nelle card
}
}

.text-secondary {
color: $body-color !important;
}

.content-area,
Expand All @@ -27,6 +30,24 @@
page-break-inside: avoid;
}

.container {
max-width: 98%;
}

// padding/margin
.py-5 {
padding-top: 20px !important;
padding-bottom: 20px !important;
}

.pb-5 {
padding-bottom: 20px !important;
}

.pt-5 {
padding-top: 20px !important;
}

// removed part of header header
.it-header-slim-wrapper {
display: none;
Expand All @@ -51,10 +72,8 @@
}

.it-brand-text {
.no_toc {
color: $link-color;
font-size: 2rem !important;
}
color: $link-color;
font-size: 2rem !important;
}
}
}
Expand Down Expand Up @@ -86,6 +105,10 @@
}
}

.section {
padding: 1.2rem;
}

/* Removed shadow and card's padding. Add border*/
.card {
border: 1px solid $gray-border !important;
Expand All @@ -99,15 +122,34 @@
border: none !important;
border-left-width: 0 !important;
}

&::after {
display: none;
}

&.card-bg {
background-color: white !important;
color: $body-color !important;
}
}

//card teaser 3
// Card teaser
.card-wrapper.card-teaser-wrapper.card-teaser-block-3 {
> .card-teaser {
flex: 0 0 32%;
flex: 0 0 32.5%;
}
}

.card.card-teaser.simple-card-default-item .card-body .card-title a,
.card.card-teaser .card-body .card-title a,
.card .card-title a {
font-size: 1.1rem !important;
}

.card .card-body .category-top {
flex-wrap: wrap;
}

#text-tempi_e_scadenze > div > p {
padding: 1rem 0 0 0 !important;
box-shadow: none !important;
Expand Down Expand Up @@ -165,7 +207,7 @@
.it-page-sections-container {
border-top: none;

.it-carousel-wrapper {
.it-carousel-wrapper:not(#galleria) {
display: none;
}

Expand Down Expand Up @@ -236,25 +278,46 @@

.callout {
page-break-inside: avoid;

.callout-inner {
// padding-top: 0px;
p {
margin-top: -2rem;
}
}
}
// buttons
button.btn,
.btn.btn-primary,
.draftjs-buttons a {
padding: 0.5rem 1rem;
border: 1px solid $link-color;
background-color: white;
color: $link-color;

svg.icon {
color: $link-color;
fill: $link-color;
}
}

// blockquote text
blockquote.blockquote-card.dark,
.blockquote.blockquote-card.dark {
border: 1px solid $body-color;
background-color: white;
color: $body-color;

a:not(.btn) {
color: $body-color;
}
}
}

.draft-text-larger {
font-size: 1.2rem;
}

.public-ui .draftjs-buttons a {
padding: 0rem;
background-color: white;
color: $link-color;
}

//external link icon
svg.external-link {
display: none;
Expand Down
9 changes: 0 additions & 9 deletions src/theme/ItaliaTheme/Print/_bandi.scss

This file was deleted.

Loading

0 comments on commit 2374b47

Please sign in to comment.