Skip to content

Story: Basic Card Component#2107

Merged
jlchilders11 merged 12 commits intoboostorg:v3from
jlchilders11:jc/basic-card
Mar 3, 2026
Merged

Story: Basic Card Component#2107
jlchilders11 merged 12 commits intoboostorg:v3from
jlchilders11:jc/basic-card

Conversation

@jlchilders11
Copy link
Collaborator

@jlchilders11 jlchilders11 commented Feb 26, 2026

@jlchilders11
Copy link
Collaborator Author

@gregjkal For this one, let me know if you have any feedback on making this more extensible/reusable. I'd like this to be something we can build off of with minimal copy pasting

Copy link
Collaborator

@gregjkal gregjkal left a comment

Choose a reason for hiding this comment

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

Not a bad start.

For extensibility... I don't think our cards have enough in common besides styling to make this inheritable / extensible. I do think we would benefit from a common .card class and css rules, since there is a lot of commonality there. Something like:

  .card {
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    max-width: 458px;
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--border-radius-xl, 12px);
    border: 1px solid var(--color-stroke-weak, rgba(5, 8, 22, 0.1));
    background: var(--color-surface-weak, white);
    overflow: hidden;
  }

Then all our card components would have classes like

<div class="card basic-card">

{% block bottom_hr %}
<hr class="card__hr" />
{% endblock %}
{% block buttons %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's not roll our own buttons here - re-use the button components.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Having said this, I'm realizing none of the other components use button components 🥴.

Let's start fixing that with this PR 😊

{% block body_content %}
<span class="card__text">{{ text }}</span>
{% endblock %}
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Bug: card__text class is used here but never defined in card.css. This text will be unstyled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So on second review of the figma, I don't believe there is any actual styling on this text, so eliminating this class for now

@jlchilders11 jlchilders11 requested a review from gregjkal March 2, 2026 15:28
Copy link
Collaborator

@gregjkal gregjkal left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all the feedback. Couple very minor new things, but approving as-is.

Copy link
Collaborator

@fromagge fromagge left a comment

Choose a reason for hiding this comment

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

Great

@jlchilders11 jlchilders11 merged commit 87c52d2 into boostorg:v3 Mar 3, 2026
4 checks passed
@jlchilders11 jlchilders11 deleted the jc/basic-card branch March 3, 2026 15:09
@jlchilders11 jlchilders11 added the QA Ready For QA label Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Ready For QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants