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

THUB-19: basic card styling #12

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all 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/main.css

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions src/scss/components/card/_basic-card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@charset "UTF-8";

.ptype-stanford-card {

// Card display
.su-card {
border: none;
box-shadow: none;

.image {
img,
figure {
display: block;
min-height: 397px;
width: 100%;
object-fit: cover;
}
}

section.su-card__contents {
padding: 4rem 0 0 0;

div.su-card__superhead {
@include slab;

font-size: 1.9rem;
font-weight: 400;
margin-bottom: 0;
line-height: 120%;
}

p {
padding: 1.8rem 0;
}


h2,
h3 {
@include thub-type-b;

margin-bottom: 0;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@jenbreese everything looks great! It looks like all we're missing is the spacing for the <p> tags. We could add a margin-bottom to the heading and add a margin-bottom to the last <p> tag 😄 Let me know what you think!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rebeccahongsf I added margins to the <p> because headings can be optional. Thank you for catching this!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jenbreese! This looks good to me 🎉

Feel free to merge it in when you're ready since I pre-approved 😄

.su-link--action {
font-size: 1.9rem;
margin-top: 1.8rem;
}

.su-card__button {
margin-top: 1.8rem;
}
}
}

}
5 changes: 5 additions & 0 deletions src/scss/components/card/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@charset "UTF-8";

// Card Roll Up

@import 'basic-card';
1 change: 1 addition & 0 deletions src/scss/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
// @import 'component-name/index';

@import 'brand-bar/index';
@import 'card/index';
@import 'hero-banner/index';
@import 'local-footer/index';
@import 'main-nav/index';
Expand Down
Loading