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

Border width class affecting the children as well #37963

Closed
3 tasks done
Al-Ki-Lee opened this issue Jan 27, 2023 · 2 comments · Fixed by #37999
Closed
3 tasks done

Border width class affecting the children as well #37963

Al-Ki-Lee opened this issue Jan 27, 2023 · 2 comments · Fixed by #37999
Labels

Comments

@Al-Ki-Lee
Copy link

Al-Ki-Lee commented Jan 27, 2023

Prerequisites

Describe the issue

When I use the border width class, the effect go to all the children elements having a border as well.

Here is an exemple :

<div class="container border border-5 border-primary">
        <div class="border">Test</div>
</div>

The solution I found is to override the border width class directly in each children element's class :

<div class="container border border-5 border-primary">
        <div class="border border-1">Test</div>
</div>

I expected that the border of the children would not be affected as well. Is that normal ?

Reduced test cases

None

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome, Firefox

What version of Bootstrap are you using?

5.3.0-alpha1

@Al-Ki-Lee Al-Ki-Lee changed the title Provide a general summary of the issue Border width class affecting the children as well Jan 27, 2023
@whatbird
Copy link

whatbird commented Feb 3, 2023

looks to me (5.2.3) that the .border-5 classes are setting --bs-border-width when perhaps they should be setting border-width

@mdo
Copy link
Member

mdo commented Feb 4, 2023

Yeah this was changed in v5.2.0 with the massive introduction of CSS variables. I can see how this is a problem, so going to open a PR to fix. Thanks!

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 a pull request may close this issue.

3 participants