Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the new Bootstrap 4 control-label class?

Tags:

bootstrap-4

Visual Studio 2013, asp.net web app .Net 4.5

The Bootstrap 4 migration doc says:

Renamed .control-label to .form-control-label.

But I can't find any such class in any bs 4 css file. So what is the replacement?

like image 664
Robert Achmann Avatar asked Jan 28 '18 01:01

Robert Achmann


People also ask

What changed in Bootstrap 4?

With Bootstrap version 4, an improvement has been made to make it a 5 grid tier system, xs, sm, md, lg, and xl. The new grid tier, xl, extends the media query range all the way down to 544px. The improved grid system also offers the following: Support for flexbox in the grid mixins and predefined classes.

What are labels in Bootstrap?

Labels: Bootstrap '. label' class is a pre-defined class that provides the important additional details related to links or text on web pages such as warnings, counts, update, alert and tips, etc. in a different format. & also adds styles to the content on the web page.

Which class does Bootstrap 4 provide in order to be used only when the form control is invalid?

Here's how form validation works with Bootstrap: HTML form validation is applied via CSS's two pseudo-classes, :invalid and :valid . It applies to <input> , <select> , and <textarea> elements. Bootstrap scopes the :invalid and :valid styles to parent .


1 Answers

Here's the explanation:

Removed the unused .form-control-label class. If you did make use of this class, it was duplicate of the .col-form-label class that vertically centered a <label> with it’s associated input in horizontal form layouts.

Renamed .control-label to .col-form-label.

Reference:

https://getbootstrap.com/docs/4.0/migration/#breaking

You were referring to the alpha docs which are vastly outdated. I mean, the alpha version of Bootstrap 4 is vastly outdated.

like image 86
WebDevBooster Avatar answered Oct 19 '22 22:10

WebDevBooster