-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
[v4] Why are all col classes 'position: relative'? #25254
Comments
Do you have a demo of the problem you're facing? |
It's not really a problem, it's just a question for the reasoning behind it. If it's to accompany a z-index elsewhere or squash some browser bug somewhere, I can understand why that would be relevant - but I'm trying to find why it's there and not static by default. |
I've put together a quick pen to show a use case. I generally expect my parent blocks and wrappers to have priority for positioning. |
Honestly can't recall—was hoping your live example would jog my memory :). Looking at v4's and v3's source code, it's there in both, but I'm unsure if I can track it fully in our history. |
Welp, found it, but no answers: 0f17f9b. I imagine it's safe to remove? Dunno how many folks have built with it in mind already... |
Cheers for looking into that. Assuming it's safe, I'll apply the override in my own codebase then. I'm trying to think of a scenario where someone might have used relative columns for something. Maybe in a case where they hacked a set of columns to have a certain height so they could do the same as my demo. Or they're doing something tricky with z-indexes.. That's all I can think of right now. If it's not serving any purpose, having a blank positioning context for the columns would be beneficial I reckon. |
Agreed. I'll open a PR and start to get some feedback. Thanks for asking and for the example! |
PR opened: #25255. |
If I'm not mistaken, |
@asyncdesign Yup, I know how it could be used with that, but there's nothing in the history that shows this was intentional on my part.
It wouldn't require a nested container—it'd require folks to add it manually with custom CSS or our |
Any update on this? |
I too am having to override this, another use case we are experiencing is the use of a calendar picker within a column- in a form. |
Somewhat related -- you can absolutely position to the bottom of a bootstrap column, but the column itself doesn't fill 100% vertical space; could probably resolve it with (see positioning of the two red divs): |
Checking in on this, the one holdup I have for it is that this breaks our custom form validation styles when using tooltips: http://getbootstrap.com/docs/4.1/components/forms/#tooltips. I think this might have to wait until v5 to avoid breaking things. Thoughts @andresgalante? |
Just discovered an ugly UI issue from this because positioned elements affect the stacking of elements. A recent change added a couple of |
Setting a column to relative positioning should be at the discretion of the developer. Having every column set to |
Yup, agreed. We'll be dropping the relative from columns in v5, just need to make sure we're considering the change to other components as mentioned in my last comment. <3 |
Awesome! Good to hear. |
FWIW I figured the |
@mdo Be aware that the |
thank you all guys for this thread, i'm a happy user of v4 from 2022, and anyway overriding yours p.s. looking forward to use v5 |
Is there a reason for making all columns relative?
Typically I wrap my rows and cols inside 'sections' which have their own padding top and bottom. I sometimes choose to make elements inside those columns stick absolutely to the edges of the section. With cols as relative now, it's less trivial to do so.
Applying an override of..
does the trick, and I can't seem to find any drawbacks. Although I'm wondering if there's a good reason for relative in the first place? Please correct me if I'm wrong or missing something.
Cheers!
The text was updated successfully, but these errors were encountered: