Skip to content

Fix: CButton variant styling when undefined #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2025

Conversation

jrd-lewis
Copy link
Contributor

This PR will fix where the CButton defaults to 'btn-undefined' when the variant is not declared.

Example, pre-PR with no declared variant attribute on a CButton component:

image

New Behavior:

  • If the variant attribute is undeclared, it will not add 'btn-undefined' like it had been doing.
  • If both the color and variant attributes are declared, it will 'btn-{variant}-{color}' like it currently does.
  • If the color attribute is undeclared and the variant attribute is declared, it will 'btn-{variant}' like it currently does.

@mrholek mrholek merged commit d53b6fe into coreui:main Jul 31, 2025
@mrholek
Copy link
Member

mrholek commented Jul 31, 2025

@jrd-lewis, thank you for your help!

@jrd-lewis jrd-lewis deleted the feature/cbutton-variant-fix branch August 1, 2025 02:00
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