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

[BD-46] fix: fixed border-radius of the card img #2511

Merged
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 src/Card/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $card-logo-bottom-offset-horizontal: .4375rem !default;
$card-logo-width: 7.25rem !default;
$card-logo-height: 4.125rem !default;

$card-image-border-radius: .3125rem !default;
$card-image-border-radius: $card-border-radius !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

@adamstankiewicz was the intention of this comment to handle things this way, or to just use $card-border-radius everywhere directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this PR @adamstankiewicz proposed to unify specific border-radius variables for Card and CardImg.

Copy link
Member

Choose a reason for hiding this comment

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

@PKulkoRaccoonGang @brian-smith-tcril I believe it would be preferable to have a single $card-border-radius used everywhere directly. That said, if we remove $card-image-border-radius, any brand authors that might have overridden that variable to customize the brand would no longer be able to. That said, it's probably unlikely many brand authors are modifying this variable 🤷‍♂️

Perhaps we plan to keep it with $card-image-border-radius: $card-border-radius as currently implemented for now and then remove it fully (in favor of using $card-border-radius everywhere directly) in the alpha breaking release?

$card-logo-border-radius: .25rem !default;

$card-footer-text-font-size: $x-small-font-size;
Expand Down
6 changes: 5 additions & 1 deletion src/Card/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ a.pgn__card {

.pgn__card {
outline: none;
overflow: hidden;

@include pgn-box-shadow(1, "down");

Expand Down Expand Up @@ -295,6 +294,8 @@ a.pgn__card {
object-fit: cover;
max-height: inherit;
width: 100%;
border-top-left-radius: $card-image-border-radius;
border-top-right-radius: $card-image-border-radius;
display: none;

&.show {
Expand All @@ -313,6 +314,9 @@ a.pgn__card {
.pgn__card-image-cap {
height: 100%;
max-width: inherit;
border-top-left-radius: $card-image-border-radius;
border-top-right-radius: 0;
border-bottom-left-radius: $card-image-border-radius;
width: auto;
object-fit: cover;
}
Expand Down
Loading