Rename the playing-card CSS class away from Bootstrap's .card-img
CI / Build and push docker image (push) Successful in 1m10s
CI / Build and push docker image (push) Successful in 1m10s
Bootstrap 5.3 ships .card-img{width:100%} for images inside cards, which
collided with the similarly named class emitted by the card helpers:
every card image stretched to its container width, so the table cards
wrapped one per flex line and pushed the player's hand below the
viewport. Emit 'playing-card' instead and rename the six selectors in
style.css; callers keep passing only the size modifiers.
This commit is contained in:
@@ -9,13 +9,13 @@ pub fn card_img(code: String, class: &'static str) -> View {
|
||||
let src = card_asset(&code);
|
||||
let alt = card_label(&code);
|
||||
view! {
|
||||
img(src=src, class=format!("card-img {class}"), alt=alt, draggable="false")
|
||||
img(src=src, class=format!("playing-card {class}"), alt=alt, draggable="false")
|
||||
}
|
||||
}
|
||||
|
||||
/// Render the back of a card (used for opponents' hidden hands).
|
||||
pub fn card_back(class: &'static str) -> View {
|
||||
view! {
|
||||
img(src=CARD_BACK, class=format!("card-img {class}"), alt="card back", draggable="false")
|
||||
img(src=CARD_BACK, class=format!("playing-card {class}"), alt="card back", draggable="false")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user