Skip to content

.center-block class isn't responsive #19357

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

Closed
andyrichardson opened this issue Feb 29, 2016 · 3 comments
Closed

.center-block class isn't responsive #19357

andyrichardson opened this issue Feb 29, 2016 · 3 comments

Comments

@andyrichardson
Copy link

There is a lack of ability to center element based on screen size.
This is inconsistent with the general class syntax of bootstrap 4, see below:

Text Center Evolution
<p class = "text-center"> Bootstrap 3 </p>
<p class = "text-*-center"> Bootstrap 4 </p>

Block Center Evolution
<img class = "center-block"/> //Bootstrap 3

<img class = "center-block"/> // Bootstrap 4 (current)

<img class = "center-*-block"/> // Bootstrap 4 (fix)

Conclusion
Create "center-*-block" classes

@cvrebert cvrebert changed the title Center-Block Class Isn't Responsive .center-block class isn't responsive Feb 29, 2016
@saviomd
Copy link

saviomd commented Mar 1, 2016

I think .center-block should reset float too, so it could be used with columns and be less verbose.
ie.

<div class="col-xs-8 col-xs-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4"></div>

would become

<div class="col-xs-8 col-md-6 col-lg-4 center-xs-block"></div>

@RyanZim
Copy link

RyanZim commented Mar 8, 2016

.center-block was removed in #19102 in favor of .m-x-auto. If it's going to stay that way, we should have a .display-block or .display-*-block class as recommended in #19343.

@cvrebert
Copy link
Collaborator

.display-*-block was rejected in #18410.
Closing this since, as noted, .center-block no longer exists.

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

No branches or pull requests

4 participants