Skip to content

Set up Demo site for Flowbite 4#53

Merged
koppen merged 4 commits intomainfrom
flowbite4
Dec 1, 2025
Merged

Set up Demo site for Flowbite 4#53
koppen merged 4 commits intomainfrom
flowbite4

Conversation

@koppen
Copy link
Copy Markdown
Member

@koppen koppen commented Dec 1, 2025

No description provided.

The attribute-based dark mode toggling doesn't seem to work for all
components. In particular, the card components doesn't enter dark mode.
@koppen koppen requested a review from Copilot December 1, 2025 14:44
@koppen koppen merged commit 0163e36 into main Dec 1, 2025
9 checks passed
@koppen koppen deleted the flowbite4 branch December 1, 2025 14:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the demo site to support Flowbite 4, migrating from hardcoded Tailwind color classes to semantic design tokens and updating the dark mode implementation from data-theme attributes to CSS classes.

Key changes:

  • Migrated all color references to semantic tokens (e.g., text-gray-900text-heading, text-blue-600text-brand)
  • Updated dark mode to use CSS class-based approach (.dark) instead of data-theme attributes
  • Improved code formatting with multi-line HTML attributes for better readability

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
demo/app/views/pages/index.html.erb Updated hero section and feature cards to use semantic color tokens; changed button style from alternative to secondary; improved HTML formatting
demo/app/views/layouts/application.html.erb Updated navigation and footer styling to semantic tokens; changed theme toggle from data-theme to CSS class-based approach; improved HTML formatting
demo/app/assets/tailwind/application.css Added Inter font import; reordered theme loading; updated dark mode custom variant; changed footer link colors to semantic tokens
app/components/flowbite/card/card.html.erb Updated card content text color to use text-body semantic token

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<script>
function setTheme(theme) {
document.documentElement.setAttribute('data-theme', theme);
if (theme == "dark") {
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

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

Use strict equality operator (===) instead of loose equality (==) when comparing strings. This prevents unexpected type coercion issues and is a JavaScript best practice.

Suggested change
if (theme == "dark") {
if (theme === "dark") {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants