This commit is contained in:
Leonhard Strohmidel
2020-07-31 19:52:57 +02:00
parent 10c3b3179e
commit 6413492586
4 changed files with 140 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
.LP-Input:has( .LP-Input__Field:disabled){
background-color: red;
}
.LP-Input{
$-margin-bottom: 30px;
display: flex;
@@ -17,11 +21,29 @@
background-color: $-secondary-background-color;
border-radius: 3px 3px 0 0;
}
&:disabled{
background-color: transparent;
border-bottom: 1px dashed $-secondary-color;
cursor: not-allowed;
&:active{
margin-bottom: $-margin-bottom;
border-radius: 0;
}
~.LP-Input__Message{
visibility: hidden;
}
}
}
.LP-Input__Label{
font-family: $-primary-sans-serif-font;
font-size: 18px;
}
.LP-Input__Message{
font-family: $-primary-sans-serif-font;
font-style: italic;

View File

@@ -2,4 +2,9 @@
<label for="input123" class="LP-Input__Label">First name</label>
<input type="text" id="input123" class="LP-Input__Field"/>
<span class="LP-Input__Message">Field is required</span>
</div>
<div class="LP-Input">
<label for="input123" class="LP-Input__Label">First name</label>
<input type="text" id="input123" class="LP-Input__Field" disabled="disabled"/>
<span class="LP-Input__Message">Field is required</span>
</div>

View File

@@ -25,6 +25,11 @@
<input type="text" id="input123" class="LP-Input__Field"/>
<span class="LP-Input__Message">Field is required</span>
</span>
<span class="LP-Form__Field LP-Form__Field--narrower LP-Input">
<label for="input123" class="LP-Input__Label">Disabled</label>
<input type="text" id="input123" class="LP-Input__Field" disabled="disabled"/>
<span class="LP-Input__Message">Field is required</span>
</span>
</div>
<div class="LP-Form__Composition">