Skip to content

Commit

Permalink
[BUGFIX] Fix margins of form labels
Browse files Browse the repository at this point in the history
Labels within FormEngine are bold, but due to Boostrap 5
all labels in all places were bold and created margin, making
the rendering of the rest of the TYPO3 Backend hard-to-grasp,
as well as FormEngine not allowing to have a different view
for labels of fields, and labels of actual form elements.

This change adapts the margin and font-weight accordingly.

Resolves: #93519
Releases: master
Change-Id: I3bf0fda432cf43309fe3909a22784609ddeaa904
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67952
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Richard Haeser <richard@richardhaeser.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Richard Haeser <richard@richardhaeser.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bmack committed Feb 16, 2021
1 parent 1920963 commit f9b2d9d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Build/Sources/Sass/typo3/_main_form.scss
Expand Up @@ -87,7 +87,7 @@ label {
}

.form-control-wrap {
margin: 9px 0;
margin: 0 0 0.5rem;
}

.form-control-holder {
Expand All @@ -112,6 +112,12 @@ label {
top: 100%;
}
}

> label,
> .form-label {
font-weight: 600;
margin: 0.25rem 0 0.5rem;
}
}

.form-control[disabled],
Expand Down
3 changes: 2 additions & 1 deletion Build/Sources/Sass/variables/_main.scss
Expand Up @@ -146,7 +146,8 @@ $input-color-placeholder: $gray-300;
$input-color-disabled: $gray-600;
$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 1.6) + 2);
$input-border-color: $gray-500;
$form-label-font-weight: 700;
$form-label-font-weight: 400;
$form-label-margin-bottom: 0.25rem;
$form-switch-width: 2.5em;

// Navbar
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/backend/Resources/Public/Css/backend.css

Large diffs are not rendered by default.

0 comments on commit f9b2d9d

Please sign in to comment.