Skip to content

feat(Card): remove --bs-card-body-color variable - #8455

Merged
ArgoZhang merged 6 commits into
mainfrom
refactor-card
Sep 11, 2026
Merged

feat(Card): remove --bs-card-body-color variable#8455
ArgoZhang merged 6 commits into
mainfrom
refactor-card

Conversation

@ArgoZhang

@ArgoZhang ArgoZhang commented Sep 11, 2026

Copy link
Copy Markdown
Member

Link issues

fixes #8454

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Replace the card body color variable with Bootstrap’s standard card styling variables and improve card body appearance consistency.

Bug Fixes:

  • Remove the deprecated card body color variable and align card text styling with Bootstrap’s standard card color variable.

Enhancements:

  • Set the default card body background and preserve rounded corners when card bodies are the first or last card content.
  • Update console styling to use the standard card color and body background variables.

@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaces the unsupported --bs-card-body-color usage with Bootstrap’s --bs-card-color and aligns the Cards sample and Console component with the new variable scheme; also adds hidden overflow to the card container and retains Console scrolling.

File-Level Changes

Change Details Files
Remove the card-body-specific text-color variable and rely on Bootstrap’s card color variable for inherited text styling.
  • Stop applying --bs-card-body-color in card body styles.
  • Map Console’s body color and background settings to --bs-card-color and --bs-card-body-bg.
  • Update the Cards sample to set the supported card color variable for custom body styling.
src/BootstrapBlazor/Components/Card/Card.razor.scss
src/BootstrapBlazor/Components/Console/Console.razor.scss
src/BootstrapBlazor.Server/Components/Samples/Cards.razor
Adjust card layout and Console rendering to preserve content behavior after the variable migration.
  • Enable hidden overflow on the card container.
  • Keep Console body scrolling while moving its background configuration to the card-level variable.
src/BootstrapBlazor/Components/Card/Card.razor.scss
src/BootstrapBlazor/Components/Console/Console.razor.scss

Assessment against linked issues

Issue Objective Addressed Explanation
#8454 Remove the deprecated --bs-card-body-color variable from Card styling and eliminate its usage throughout the codebase.
#8454 Preserve card and console appearance by using the standard --bs-card-color and --bs-card-body-bg variables where needed.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bb-auto bb-auto Bot added the enhancement New feature or request label Sep 11, 2026
@bb-auto bb-auto Bot added this to the v10.10.0 milestone Sep 11, 2026

@bb-auto bb-auto Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto approved by bb-auto

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/BootstrapBlazor/Components/Card/Card.razor.scss" line_range="9" />
<code_context>
     --bb-card-title-margin-left: #{$bb-card-title-margin-left};
     --bb-card-header-tag-height: #{$bb-card-header-tag-height};
     --bs-card-title-spacer-y: #{$bb-card-title-spacer-y};
+    overflow: hidden;
 }

</code_context>
<issue_to_address>
**issue (broader_impact):** `overflow: hidden` clips absolutely positioned descendants that extend beyond the card border, such as dropdown menus, popovers, and other overlays rendered inside a card. Those controls become partially or completely inaccessible when their popup crosses the card boundary.

**Triggers:** When a card contains a dropdown, popover, tooltip, or other positioned child whose rendered area extends outside the card.

**Suggested fix:** Apply the overflow clipping only to the card sections that need rounded-corner clipping, or use a wrapper for the card background/border so positioned descendants remain visible.

```suggestion

```
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: src/BootstrapBlazor/Components/Card/Card.razor.scss:9


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread src/BootstrapBlazor/Components/Card/Card.razor.scss Outdated
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (959727d) to head (2c4d7d0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8455   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          776       776           
  Lines        35069     35069           
=========================================
  Hits         35069     35069           
Flag Coverage Δ
BB 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bb-auto bb-auto Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto approved by bb-auto

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

@bb-auto bb-auto Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto approved by bb-auto

@ArgoZhang
ArgoZhang merged commit aa801c5 into main Sep 11, 2026
4 checks passed
@ArgoZhang
ArgoZhang deleted the refactor-card branch September 11, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(Card): remove --bs-card-body-color variable

1 participant