Code Monkey home page Code Monkey logo

Comments (7)

XhmikosR avatar XhmikosR commented on April 28, 2024 1

This was introduced in #39373. /CC @mdo @julien-deramond

from bootstrap.

justin-oh avatar justin-oh commented on April 28, 2024 1

This broke for me in potentially a different way when I went from 5.3.2 to 5.3.3.

These are the pertinent variables as set by Bootstrap:

$modal-inner-padding:               $spacer !default;
$modal-header-padding-y:            $modal-inner-padding !default;
$modal-header-padding-x:            $modal-inner-padding !default;
$modal-header-padding:              $modal-header-padding-y $modal-header-padding-x !default;

This is how I overwrote those variables when using 5.3.2:

$modal-inner-padding:               0;
$modal-header-padding:              $spacer;

I found I had to make the following update:

$modal-inner-padding:               0;
$modal-header-padding-y:            $spacer;
$modal-header-padding-x:            $spacer;

I don't understand CSS enough to know why, but if either of --bs-modal-header-padding-x or --bs-modal-header-padding-y are 0, then the following doesn't work:

margin: calc(-.5* var(--bs-modal-header-padding-y)) calc(-.5* var(--bs-modal-header-padding-x)) calc(-.5* var(--bs-modal-header-padding-y)) auto;

In my case both were 0, which should make the above effectively margin: 0 0 0 auto. Again, I don't understand why, but if I override the property to literally margin: 0 0 0 auto, it works.

You can see this in action by fiddling around in the inspector of https://getbootstrap.com/docs/5.3/components/modal/.

from bootstrap.

julien-deramond avatar julien-deramond commented on April 28, 2024 1

I was waiting for a reproducible example so far. I'll try to look into it as soon as possible manually based on #39798 (comment). FYI, as we tried to have a consistent approach with modals and offcanvases, it might be more than a revert. I'll keep you in touch (or @mdo if he manages to check this out before me).

from bootstrap.

github-actions avatar github-actions commented on April 28, 2024

Hello @bbottema. Bug reports must include a live demo of the issue. Per our contributing guidelines, please create a reduced test case on CodePen or StackBlitz and report back with your link, Bootstrap version, and specific browser and Operating System details.

from bootstrap.

maleeb avatar maleeb commented on April 28, 2024

I currently use justify-content-between on modal-header as a workaround.

from bootstrap.

XhmikosR avatar XhmikosR commented on April 28, 2024

@mdo @julien-deramond if you guys don't have time, perhaps we could just revert the offending patch next week and release a new version.

from bootstrap.

justin-oh avatar justin-oh commented on April 28, 2024

I can confirm through the same means (fiddling around in the inspector of https://getbootstrap.com/docs/5.3/components/offcanvas/) that the offcanvas button position also fails if either of --bs-offcanvas-padding-x or --bs-offcanvas-padding-y are 0.

But please check for yourself!

from bootstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.