twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
170.25k stars 78.77k forks source link

Padding, margin, general classes to introduce #16667

Closed choros7 closed 9 years ago

choros7 commented 9 years ago

Hi Why not to introduce classes for padding, margin etc to bootstrap? e.g .p-l-30 { paddin-left: 30px } then class for mobile with media query max like p-l-30-sm { {padding-left: 30px;} etc... does it make sense?

monoblaine commented 9 years ago

For the sake of maintainability, a class name should be semantic. It should mean something by itself. .p-l-30 however, has no meaning. If you really feel that you should name it this way, it's probably a sign of code smell.

patrickhlauke commented 9 years ago

I think this would move too far towards "atomic/OOCSS", and would require a fairly major refactoring of all CSS in Bootstrap. Certainly not going to happen in v3, and not quite sure - philosophically at least, but @mdo would know more - if it's something we'd consider for v4.

Personally, I'm not a fan anyway...

choros7 commented 9 years ago

Please no offence, I'm just beginner developer. My work friend used these classes in that way so I thought its fine and useful. I do not see any problem to add right name for each class. Btw bootstrap has some classes like that e.g pull-right, pull-left, col-xs-12 etc and nobody complain. Thanks for reply

akhyarrh commented 9 years ago

I think set for margin/padding related to playing with some mixin/placeholder/etc library. Bootstrap is CSS framework, even there's some mixin included. So everything is okay.

mdo commented 9 years ago

Not happening until v4.