Skip to content

Commit

Permalink
Establish styles for select boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonallured committed Feb 17, 2024
1 parent 37ac273 commit 73e3b64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
input[type='file'],
input[type='password'],
input[type='text'],
select,
textarea {
@apply bg-off-black;
@apply block;
Expand All @@ -54,19 +55,22 @@
@apply w-80;
}

input[type='file']:invalid {
input[type='file']:invalid,
select:invalid {
@apply text-dark-gray;
}

input:focus[type='date'],
input:focus[type='file'],
input:focus[type='password'],
input:focus[type='text'],
select:focus,
textarea:focus,
input:hover[type='date'],
input:hover[type='file'],
input:hover[type='password'],
input:hover[type='text'],
select:hover,
textarea:hover {
@apply border-pink;
@apply ring-0;
Expand Down
5 changes: 5 additions & 0 deletions app/views/static/form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
%textarea(placeholder="write a note")
%input(type="password" placeholder="password")
%input(required="true" type="file")
%select(required="true")
%option(value="" disabled="true" selected hidden) pick parser
%option first
%option second
%option third
%button(type="submit") submit

%h2 Another Form
Expand Down

0 comments on commit 73e3b64

Please sign in to comment.