Skip to content

Commit

Permalink
Merge pull request #110 from sausagenoods/siren-file-input-button
Browse files Browse the repository at this point in the history
Style file selector button
  • Loading branch information
oxalorg authored Jul 27, 2023
2 parents ee114b8 + 3b8050f commit b51289a
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 22 deletions.
6 changes: 3 additions & 3 deletions css/sakura-dark-solarized.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -186,11 +186,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #657b83;
border-color: #657b83;
color: #002b36;
Expand Down
6 changes: 3 additions & 3 deletions css/sakura-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -186,11 +186,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #c9c9c9;
border-color: #c9c9c9;
color: #222222;
Expand Down
6 changes: 3 additions & 3 deletions css/sakura-earthly.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -185,11 +185,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #006994;
border-color: #006994;
color: #ffffff;
Expand Down
6 changes: 3 additions & 3 deletions css/sakura-ink.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -185,11 +185,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #DA4453;
border-color: #DA4453;
color: #ffffff;
Expand Down
6 changes: 3 additions & 3 deletions css/sakura-pink.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -185,11 +185,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #753851;
border-color: #753851;
color: #ffe4f5;
Expand Down
6 changes: 3 additions & 3 deletions css/sakura-vader.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -186,11 +186,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #DA4453;
border-color: #DA4453;
color: #120c0e;
Expand Down
6 changes: 3 additions & 3 deletions css/sakura.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ textarea {
width: 100%;
}

.button, button, input[type=submit], input[type=reset], input[type=button] {
.button, button, input[type=submit], input[type=reset], input[type=button], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand All @@ -185,11 +185,11 @@ textarea {
cursor: pointer;
box-sizing: border-box;
}
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled] {
.button[disabled], button[disabled], input[type=submit][disabled], input[type=reset][disabled], input[type=button][disabled], input[type=file]::file-selector-button[disabled] {
cursor: default;
opacity: 0.5;
}
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled {
.button:focus:enabled, .button:hover:enabled, button:focus:enabled, button:hover:enabled, input[type=submit]:focus:enabled, input[type=submit]:hover:enabled, input[type=reset]:focus:enabled, input[type=reset]:hover:enabled, input[type=button]:focus:enabled, input[type=button]:hover:enabled, input[type=file]::file-selector-button:focus:enabled, input[type=file]::file-selector-button:hover:enabled {
background-color: #982c61;
border-color: #982c61;
color: #f9f9f9;
Expand Down
2 changes: 1 addition & 1 deletion scss/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ textarea {
width: 100%;
}

.button, button, input[type="submit"], input[type="reset"], input[type="button"] {
.button, button, input[type="submit"], input[type="reset"], input[type="button"], input[type=file]::file-selector-button {
display: inline-block;
padding: 5px 10px;
text-align: center;
Expand Down
4 changes: 4 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,10 @@ <h1>Form elements</h1>
value="1970-01-01T00:00"
/>
</p>
<p>
<label for="if">File input</label>
<input type="file" id="if">
</p>
</fieldset>
<p><a href="#top">[Top]</a></p>
<fieldset id="forms__action">
Expand Down

0 comments on commit b51289a

Please sign in to comment.