Skip to content

Commit

Permalink
fix(core): form label white space (#12491)
Browse files Browse the repository at this point in the history
  • Loading branch information
droshev authored Oct 1, 2024
1 parent 00a6c0d commit 4b4b06f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions libs/core/form/form-label/form-label.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
@if (inlineHelpPlacement === 'before' && inlineHelpContent) {
<ng-template [ngTemplateOutlet]="inlineHelpRef"></ng-template>
}
<span class="fd-form-label" [class.fd-form-label--required]="required">
<span class="fd-form-label" [class.fd-form-label--required]="required" [class.fd-form-label--colon]="colon">
<ng-content></ng-content>
@if (colon) {
:
}
</span>
@if (inlineHelpPlacement === 'after' && inlineHelpContent) {
<ng-template [ngTemplateOutlet]="inlineHelpRef"></ng-template>
Expand Down
4 changes: 2 additions & 2 deletions libs/docs/core/input/examples/input-example.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h4 fd-form-header>Examples</h4>
<br />
<div fd-form-item>
<label fd-form-label for="input-1">Default Input</label>
<label fd-form-label for="input-1" [colon]="true">Default Input</label>
<input fd-form-control type="text" id="input-1" placeholder="Field placeholder text" />
</div>
<div fd-form-item>
<label fd-form-label [required]="true" for="input-2">Required Input:</label>
<label fd-form-label [required]="true" [colon]="true" for="input-2">Required Input</label>
<input fd-form-control type="text" id="input-2" placeholder="Field placeholder text" aria-required="true" />
</div>
<div fd-form-item>
Expand Down

0 comments on commit 4b4b06f

Please sign in to comment.