Skip to content

Commit

Permalink
Styles: Add print stylesheet
Browse files Browse the repository at this point in the history
This builds on the styles added in WordPress/wporg-parent-2021@0eda271, with styles specific to the home and about pages.

See WordPress/wporg-parent-2021#158
  • Loading branch information
ryelle committed Sep 26, 2024
1 parent 255cfd4 commit cb9f146
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
45 changes: 45 additions & 0 deletions source/wp-content/themes/wporg-main-2022/src/style/_print.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@media print {
body.home {

/* Adjust image sizes on homepage. */
.wp-block-image img {
max-width: 100%;

&[src*="wcus-logo.png"] {
max-width: 200px;
}

&.wp-image-39764,
&.wp-image-39766,
&.wp-image-39765 {
max-width: 300px;
}
}
}

/* About page: Put title all on one line. */
.wporg-about-cover-title {
display: block !important;
}

/* About page: Adjust freedom font sizes and number alignment. */
.wp-block-group[class*="wporg-about-section-freedom-"] {
break-inside: avoid;

.wp-block-columns {
flex-wrap: nowrap !important;

> :first-child {
flex-basis: min-content !important;
}

> :last-child {
padding-bottom: 0 !important;
}
}

h3 {
font-size: var(--wp--preset--font-size--heading-cta) !important;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@import "fluid";
@import "banners";
@import "print";

/*
* Override inline paddings with the spacing preset.
Expand Down

0 comments on commit cb9f146

Please sign in to comment.