Created
January 22, 2023 13:31
-
-
Save bazuka5801/ee82e04c6d8a8d4b6889471ab957f12f to your computer and use it in GitHub Desktop.
QInput customization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.myinput { | |
border-radius: 8px; | |
background: #f00; | |
// border | |
:deep(.q-field__inner) { | |
border-radius: inherit; | |
.q-field__control { | |
border-radius: inherit; | |
&:before { | |
border: 2px solid #000; | |
} | |
&:after { | |
border: none; | |
} | |
} | |
} | |
// text color | |
:deep(input) { | |
color: #ccc; | |
::placeholder { | |
color: #ccc; | |
} | |
} | |
// use 'nude' classe to make input nude | |
&.nude { | |
padding: 0; | |
:deep(.q-field__control) { | |
padding: 0; | |
height: auto; | |
&:before { | |
border: none !important; | |
} | |
input { | |
padding: 0; | |
} | |
textarea { | |
padding-top: 0; | |
} | |
} | |
} | |
// change hover color and remove box shadow | |
&:hover, | |
&:focus { | |
:deep(.q-field__control:before) { | |
border-color: #0f0; | |
} | |
box-shadow: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment