Skip to content

Commit

Permalink
[Card] Adjusted styles for media--date (#936)
Browse files Browse the repository at this point in the history
* Adjusted styles for media--date.

* Switched to flex-basis to make it easier to apply element-invisible class.

* Switched to flex-basis: auto and moved no-crop styles under left/right alignment.
  • Loading branch information
bspeare committed Jul 17, 2024
1 parent eb07ee5 commit 38f294e
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions src/scss/components/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,27 +139,6 @@
margin-left: auto;
margin-right: auto;
}

&.media--no-crop {
&.media--small,
&.media--medium,
&.media--large {
display: block;
}

// TODO: Change these to decided upon sizes.
&.media--small {
max-width: 13.625rem;
}

&.media--medium {
max-width: 27.25rem;
}

&.media--large {
max-width: 40.875rem;
}
}
}

// Allows the media to run edge to edge for stacked cards.
Expand Down Expand Up @@ -192,7 +171,7 @@
}

.media--no-crop {
display: contents;
flex-basis: auto;

// TODO: add borders, padding, etc.
}
Expand All @@ -213,9 +192,8 @@

.media--date {
position: relative;
color: $white;
background-color: $uiowa-black;
padding-top: $gutter;
border: 1px solid $uiowa-gold;
text-align: center;
width: 6rem;
height: 6rem;
Expand All @@ -242,10 +220,9 @@
}
}
// We should revisit to have appropriate color/styling for each background color option.
&:not([class*="bg--gold"]){
&[class*="bg--gold"]{
.media--date {
color: $uiowa-black;
background-color: $uiowa-gold;
border: 1px solid $uiowa-black;
}
}
}
Expand Down Expand Up @@ -394,6 +371,27 @@
}
}

.media--no-crop {
&.media--small,
&.media--medium,
&.media--large {
display: block;
}

// TODO: Change these to decided upon sizes.
&.media--small {
max-width: 13.625rem;
}

&.media--medium {
max-width: 27.25rem;
}

&.media--large {
max-width: 40.875rem;
}
}

.media--small.media--circle {
max-width: 11.375rem;
}
Expand Down

0 comments on commit 38f294e

Please sign in to comment.