Skip to content
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

Add .btn-subtle variant #38763

Closed
wants to merge 2 commits into from
Closed

Conversation

vardhan0604
Copy link

@vardhan0604 vardhan0604 commented Jun 13, 2023

Description

Added "btn-subtle" which will respect the theme, tinting the button as suitable for either dark or light mode. (ISSUE #38748)

Motivation & Context

I've been using btn-light in a number of places to act as a subtle tint. That worked prior to dark mode, but breaks now.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #38748

@vardhan0604 vardhan0604 requested a review from a team as a code owner June 13, 2023 18:41
@julien-deramond julien-deramond changed the title NEW FEATURE btn-subtle Add .btn-subtle variant Jun 14, 2023
Copy link
Member

@louismaximepiton louismaximepiton left a comment

Choose a reason for hiding this comment

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

Hey, thanks for your contribution!

This PR doesn't fix the issue raised. Maybe we can try to help you with this subject ?

}
}

@each $color, $value in $theme-colors {
Copy link
Member

Choose a reason for hiding this comment

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

Duplicate of existing code (See l.148)

@@ -150,6 +150,39 @@
@include button-outline-variant($value);
}
}

@each $color, $value in $theme-colors {
.btn-subtle {
Copy link
Member

Choose a reason for hiding this comment

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

Unless I'm wrong, it seems that you're creating several times .btn-subtle.

The goal of the issue was to create a button that could change its color and bg-color contextually. I think it's not the code proposed here and it might not be the good way to do it here.

Copy link
Author

Choose a reason for hiding this comment

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

So should I try making a new button ??

should the code be like?
@each $color, $value in $theme-colors {
.btn-tert {
@include button-variant($value, $value);
}
}

I am kinda beginner so please don't mind me

Copy link
Member

Choose a reason for hiding this comment

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

TBH, even if I think that this feature is needed, this might be studied a bit more, I think that this kind of feature might be thought for whole Bootstrap at the same time at a naming and code level.

Let's continue the discussion in the issue, and when everyone agrees on the solution, let's create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

btn-subtle button class
3 participants