Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHEMH-259 | @jdwjdwjdw | Adjust breakpoints for News cards for node page, lists, and teasers #79

Merged
merged 5 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading