rename css classes to more closely follow BEM

This commit is contained in:
Felix Hamann 2019-04-12 21:50:41 +02:00
parent c055645f11
commit 753c660007
2 changed files with 8 additions and 8 deletions

View File

@ -25,26 +25,26 @@
color: var(--color-fontsec); color: var(--color-fontsec);
} }
.form-group__label { .form-group-label {
font-weight: 600; font-weight: 600;
padding-top: 6px; padding-top: 6px;
} }
.form-group__label__hint { .form-group-label__hint {
margin-top: 7px; margin-top: 7px;
color: var(--color-fontsec); color: var(--color-fontsec);
font-size: 0.9rem; font-size: 0.9rem;
} }
.form-group--required { .form-group--required {
.form-group__label__caption::after { .form-group-label__caption::after {
content: ' *'; content: ' *';
color: var(--color-error); color: var(--color-error);
} }
} }
.form-group--optional { .form-group--optional {
.form-group__label__caption::after { .form-group-label__caption::after {
content: ''; content: '';
} }
} }

View File

@ -3,7 +3,7 @@ $newline never
$case formLayout $case formLayout
$of FormDBTablePagesize $of FormDBTablePagesize
$forall view <- fieldViews $forall view <- fieldViews
<label .form-group__label.label-pagesize for=#{fvId view}>#{fvLabel view} <label .form-group-label.label-pagesize for=#{fvId view}>#{fvLabel view}
^{fvInput view} ^{fvInput view}
$of _ $of _
$forall view <- fieldViews $forall view <- fieldViews
@ -13,11 +13,11 @@ $case formLayout
$else $else
<div .form-group :fvRequired view:.form-group--required :not $ fvRequired view:.form-group--optional :isJust $ fvErrors view:.form-group--has-error> <div .form-group :fvRequired view:.form-group--required :not $ fvRequired view:.form-group--optional :isJust $ fvErrors view:.form-group--has-error>
$if not (Blaze.null $ fvLabel view) $if not (Blaze.null $ fvLabel view)
<label .form-group__label for=#{fvId view}> <label .form-group-label for=#{fvId view}>
<span .form-group__label__caption> <span .form-group-label__caption>
#{fvLabel view} #{fvLabel view}
$maybe hint <- fvTooltip view $maybe hint <- fvTooltip view
<div .form-group__label__hint>^{hint} <div .form-group-label__hint>^{hint}
<div .form-group__input> <div .form-group__input>
^{fvInput view} ^{fvInput view}
$maybe err <- fvErrors view $maybe err <- fvErrors view