Skip to content

Commit

Permalink
CHEMH-259 | @jdwjdwjdw | Adjust breakpoints for News cards for node p…
Browse files Browse the repository at this point in the history
…age, lists, and teasers (#79)

* Adjust breakpoints for News cards for node page, lists, and teasers

* Update dist

* More News responsive fixups

* Update version number
  • Loading branch information
jdwjdwjdw authored Nov 14, 2023
1 parent dffb308 commit a7c9c57
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 52 deletions.
2 changes: 1 addition & 1 deletion chem_h_subtheme.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ChEM-H Subtheme
type: theme
description: 'ChEM-H Subtheme.'
package: Stanford
version: 8.x-1.0-dev
version: 2.2.2
core_version_requirement: ^9 || ^10
base theme: stanford_basic
libraries:
Expand Down
2 changes: 1 addition & 1 deletion dist/css/chem_h_subtheme.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -198,40 +198,23 @@

.vertical-cards.stanford-news--cards {
.grid-container-3 {
grid-template-columns: repeat(3,fit-content(461px));

@media (max-width: 1550px) {
display: block;

@include grid-media-min('md') {
&.su-list-unstyled>li {
@include centered-column;

margin-bottom: 4.5rem;

.su-news-vertical-teaser {
margin-bottom: 0;
}
}
}

.su-news-vertical-teaser {
margin-bottom: 0;
}

.ds-entity--stanford-news {
height: 100%;
}
}
}

.ptype-stanford-entity[data-react-columns="12"] {
.su-entity-item {
@media (max-width: 1550px) {
display: block;

&.su-list-unstyled>li {
@include centered-column;
}
}
}
}

@media (max-width: 1550px) {
.ds-entity--stanford-page .su-card {
margin-bottom: 4.5rem;
Expand Down
67 changes: 39 additions & 28 deletions src/scss/components/news/_news-node.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,39 +159,50 @@
}
}
}
}
}

// More News section
.stanford-news-vertical-teaser-term {
>h2 {
@include chemh-heading--badge;

margin-bottom: 6.6rem;
text-align: left;
}

.more-link {
a {
@include chemh-button--gradient;

&:focus,
&:hover {
background-color: $chemh-color-hover-peach;
// More News section
.section-supporting-content {
@include grid-media-min('sm') {
width: 100%;
}
}
}

// Related news cards in footer.
.stanford-news--cards {
&.stanford-news--cards-any {
margin-bottom: 125px;
.stanford-news-vertical-teaser-term {
>h2 {
@include chemh-heading--badge;

margin-bottom: 6.6rem;
text-align: left;
}

@media (max-width: 1550px) {
ul {
&.su-list-unstyled {
.stanford-news--cards {
ul {
&.grid-container-3 {
display: block;
@include grid-media-max('md') {
gap: 3rem;
}

.ds-entity--stanford-news {
container-type: inline-size;

@container (max-width: 200px) {
.su-card {
.su-card__contents {
padding: 2rem 2rem 0;
}
}
}
}
}
}
}

.more-link {
a {
@include chemh-button--gradient;

&:focus,
&:hover {
background-color: $chemh-color-hover-peach;
}
}
}
Expand Down

0 comments on commit a7c9c57

Please sign in to comment.