Skip to content

feat(Fluent): add Fluent UI theme - #1104

Merged
ArgoZhang merged 27 commits into
masterfrom
dev-theme
Aug 24, 2026
Merged

feat(Fluent): add Fluent UI theme#1104
ArgoZhang merged 27 commits into
masterfrom
dev-theme

Conversation

@ArgoZhang

@ArgoZhang ArgoZhang commented Aug 23, 2026

Copy link
Copy Markdown
Member

Link issues

fixes #1103

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

Add a Fluent UI theme package that brings Fluent design tokens and component styling to BootstrapBlazor in both light and dark modes.

New Features:

  • Add a Fluent UI theme package with light and dark theme support for BootstrapBlazor.

Bug Fixes:

  • Align component states, validation feedback, disabled controls, and dark-mode surfaces with Fluent UI color and contrast guidance.

Enhancements:

  • Apply Fluent UI design tokens across Bootstrap and BootstrapBlazor components, including typography, spacing, borders, shadows, controls, navigation, overlays, tables, forms, and feedback elements.

Build:

  • Add the new BootstrapBlazor.Theme.Fluent project to the solution and package its themed stylesheets.

@bb-auto bb-auto Bot added the enhancement New feature or request label Aug 23, 2026
@bb-auto bb-auto Bot added this to the v10.0.0 milestone Aug 23, 2026
@sourcery-ai

sourcery-ai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a new BootstrapBlazor Fluent UI theme package and CSS bundle that maps Fluent 2 design tokens into Bootstrap/BootstrapBlazor variables, providing consistent light/dark theming and component-specific overrides without changing existing component markup.

File-Level Changes

Change Details Files
Introduce a new Fluent UI theme component package and wire it into the solution.
  • Create BootstrapBlazor.Theme.Fluent.csproj under src/components to host the Fluent theme assets.
  • Register the new project in BootstrapBlazor.Extensions.slnx so it builds with the extensions solution.
BootstrapBlazor.Extensions.slnx
src/components/BootstrapBlazor.Theme.Fluent/BootstrapBlazor.Theme.Fluent.csproj
Add a Fluent 2-based CSS theme that redefines Bootstrap and BootstrapBlazor variables for light/dark modes and aligns component styling with Fluent UI design tokens.
  • Define root light and dark theme color, typography, spacing, border radius, and shadow tokens based on Fluent webLightTheme/webDarkTheme, mapped into --bs-* and --bb-* variables.
  • Override BootstrapBlazor component-scoped variables (layout, menu, tabs, calendar, picker, table, upload, tree, etc.) to replace hard-coded legacy blues/greys with Fluent brand and neutral palettes, including separate dark-mode adjustments.
  • Customize Bootstrap core components (buttons, forms, inputs, dropdowns, tooltips, alerts, modals, toasts, progress, list groups, pagination, nav pills, etc.) to follow Fluent interaction states (hover/pressed, focus ring, disabled behavior) and sizing (control heights, font sizes).
  • Adjust specialized widgets (switch, slider, rate, timeline, avatar, card, skeleton, mask, light indicators, SweetAlert, DateTimePicker/Range, transfer, segmented, dial-button, etc.) to use Fluent status, overlay, and motion tokens while keeping existing structure and utilities.
  • Provide a minified version fluent.min.css that matches the unminified fluent.css for production use.
src/components/BootstrapBlazor.Theme.Fluent/wwwroot/fluent.css
src/components/BootstrapBlazor.Theme.Fluent/wwwroot/fluent.min.css

Assessment against linked issues

Issue Objective Addressed Explanation
#1103 Add a Fluent UI theme to BootstrapBlazor.
#1103 Provide Fluent-themed styling for both light and dark color modes, including Bootstrap and BootstrapBlazor component variables and visual states.
#1103 Package the Fluent theme as a consumable BootstrapBlazor theme component with stylesheet assets included in the solution.

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 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

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/components/BootstrapBlazor.Theme.Fluent/wwwroot/fluent.css" line_range="1924" />
<code_context>
+}
+
+/* ===== Alert / Message — Fluent InfoBar: no visible border ===== */
+.alert {
+    --bs-alert-border: 0; /* InfoBar: border replaced by status background tint */
+    --bs-alert-padding-x: 12px; /* MessageBar paddingLeft (spacingHorizontalM) */
+    --bs-alert-padding-y: 8px; /* 8px + 20px line + 8px = 36px (MessageBar minHeight) */
+}
</code_context>
<issue_to_address>
**issue (bug_risk):** `.alert` continues rendering its default border because Bootstrap consumes `--bs-alert-border-width`, not `--bs-alert-border`; setting the unused variable does not implement the documented borderless Fluent InfoBar styling.

**Triggers:** When an alert is rendered with the default Bootstrap alert border.

**Suggested fix:** Set `--bs-alert-border-width: 0` (and retain the border color override if needed).

```suggestion
    --bs-alert-border-width: 0; /* InfoBar: border replaced by status background tint */
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/components/BootstrapBlazor.Theme.Fluent/wwwroot/fluent.css
bb-auto[bot]
bb-auto Bot previously approved these changes Aug 23, 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

@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 8ca9b31 into master Aug 24, 2026
3 checks passed
@ArgoZhang
ArgoZhang deleted the dev-theme branch August 24, 2026 03:02
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(Fluent): add Fluent UI theme

1 participant