Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/scss/bootstrap/components/_labels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ $component-name: form-label;
}
}
}

.form-check-label {
&.required {
&::before {
color: var(--bs-danger);
content: "*" / " ";
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should be moved into a new file to match Bootstrap’s architecture.
I think it should be placed inside a new src/scss/bootstrap/components/_form-check.scss file.

$component-name: form-check-label;

.#{$component-name} {
  &.required {
    &::before {
      color: var(--bs-danger);
      content: "*" / " ";
    }
  }
}

2 changes: 1 addition & 1 deletion templates/_partials/form-fields.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
value="1" {if $field.value}checked="checked"{/if}
{if $field.required}required{/if}
>
<label class="form-check-label" for="field-{$field.name}">
<label class="form-check-label{if $field.required} required{/if}" for="field-{$field.name}">
{$field.label nofilter}
</label>
</div>
Expand Down