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

Use --bs-border-width for some components #37344

Merged
merged 4 commits into from Oct 23, 2022
Merged

Use --bs-border-width for some components #37344

merged 4 commits into from Oct 23, 2022

Conversation

jonnysp
Copy link
Contributor

@jonnysp jonnysp commented Oct 20, 2022

Description

Use border-width classes on some components
to combine utility borders (border-1, boder-2, ...) on these.
like "card border-2", "alert border-4" , ...

Motivation & Context

Fixes #37326

Type of changes

adds variable border-width to some components.

  • 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

adds variable border-width to some components.
to combine utility borders (border-1, boder-2, ...) on these.

like "card border-2", "alert border-4" , ...
@jonnysp jonnysp requested a review from a team as a code owner October 20, 2022 08:28
@jonnysp jonnysp changed the title variable border-width to some components variable border-width for some components Oct 20, 2022
@mdo
Copy link
Member

mdo commented Oct 22, 2022

@jonnysp Can you check linter errors and bundle watch? (Bump the later by .25kb increments)

@mdo mdo changed the title variable border-width for some components Use --bs-border-width for some components Oct 22, 2022
@mdo
Copy link
Member

mdo commented Oct 23, 2022

Thanks!

@rxbracho
Copy link

Thank you for closing the bug #37326, I assume it is fixed but not yet in 5.2.2 so I will continue with my workaround. Do I understand correctly that this fix, which included that bug, is slated for 5.3.0? If so, I will wait, thank you. BTW, I placed a comment in that original bug, responding to the request for a CodePen.

@zackd
Copy link

zackd commented Feb 21, 2023

seeing some issues where variables are not working with calc() e.g.
margin-left: calc($input-border-width * -1);

using interpolation fixes this:
margin-left: calc(#{$input-border-width} * -1);

@jonnysp
Copy link
Contributor Author

jonnysp commented Feb 22, 2023

seeing some issues where variables are not working with calc() e.g. margin-left: calc($input-border-width * -1);

using interpolation fixes this: margin-left: calc(#{$input-border-width} * -1);

I can't see any problems here.
can you describe this in more detail.

@julien-deramond
Copy link
Member

@zackd If there are any issues, please create a new one and add a link to this PR (or any other elements) in the description. It's easier for us to track things.

@zackd
Copy link

zackd commented Feb 22, 2023

@jonnysp so the source scss is margin-left: calc($input-border-width * -1);
and the generated css is margin-left: calc($input-border-width * -1); .. which obviously is not valid
changing the scss to margin-left: calc(#{$input-border-width} * -1);
outputs css like margin-left: calc(1px * -1); .. which I assume is what is intended

If this looks like a genuine issue I'll create a ticket ...

@jonnysp
Copy link
Contributor Author

jonnysp commented Feb 22, 2023

the generated is

margin-left: calc(var(--bs-border-width) * -1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

The alert borders ignore border-width
5 participants