Skip to content

Style rules for .card-title are missing #43094

Closed

Description

@scottdorman

Prerequisites

Describe the issue

The docs still refer to using .card-title, but the style rules no longer exist in BS6. For reference, this was defined like

.card {
    --bs-card-title-spacer-y: 0.5rem;
    --bs-card-title-color: ;
}

.card-title {
   margin-bottom: var(--bs-card-title-spacer-y);
   color: var(--bs-card-title-color);
}

The rule should either be brought back or the docs updated to remove references to it.

Reduced test cases

The docs say "For a title, use .card-title." (https://getbootstrap.com/docs/6.0/components/card/#titles-text-and-links) but _card.scss no longer includes the definition.

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Microsoft Edge

What version of Bootstrap are you using?

v6.0.0-alpha.1

Activity

  1. added
    bug
    on Oct 15, 2026
  2. svetamales5-dot commented on Oct 16, 2026

    @svetamales5-dot
  3. added
    v6
    has-pr
    on Oct 16, 2026
  4. julien-deramond commented on Oct 16, 2026

    @julien-deramond
    Member

    Thanks for the report.

    This is intentional in v6. Since ed9529bf5 (cards were reworked for v6), .card-body is a flex column that spaces its direct children with gap: var(--card-body-gap) and zeroes their block margins. A title no longer needs its own margin-bottom or color token, so .card-title has no rule of its own. The docs describe it as one of the "optional classes as content hooks": it is there for you to target in your own CSS, and .card-subtitle only exists to reduce the gap above it.

    To change the space after a title, set --card-body-gap on the card (or on .card-body). To style the title itself, target .card-title in your own CSS, or use the type and color utilities on the heading.

    I've added a small precision in the docs to make it clearer via #43103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughas-prv6

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions