Skip to content

Commit

Permalink
Adds different color for input placeholder on focus
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Aug 15, 2019
1 parent 78eeec4 commit 2ac9533
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
3 changes: 3 additions & 0 deletions app/brochure/routes/tools/inline-css.js
Expand Up @@ -57,6 +57,9 @@ module.exports = function (req, res, next) {
// we need to skip font-face here... // we need to skip font-face here...
if (selector.indexOf("@font-face") > -1) return true; if (selector.indexOf("@font-face") > -1) return true;


// we need to skip font-face here...
if (selector.indexOf("placeholder") > -1) return true;

// I use some complex selectors to style these elements // I use some complex selectors to style these elements
// which do not match although they should when I run // which do not match although they should when I run
// the document query below. // the document query below.
Expand Down
30 changes: 26 additions & 4 deletions app/brochure/views/css/form.css
Expand Up @@ -120,26 +120,48 @@ textarea:focus {






::-webkit-input-placeholder { input::-webkit-input-placeholder {
/* Chrome/Opera/Safari */ /* Chrome/Opera/Safari */
color: #a09d9c; color: #a09d9c;
} }


::-moz-placeholder { input::-moz-placeholder {
/* Firefox 19+ */ /* Firefox 19+ */
color: #a09d9c; color: #a09d9c;
} }


:-ms-input-placeholder { input:-ms-input-placeholder {
/* IE 10+ */ /* IE 10+ */
color: #a09d9c; color: #a09d9c;
} }


:-moz-placeholder { input:-moz-placeholder {
/* Firefox 18- */ /* Firefox 18- */
color: #a09d9c; color: #a09d9c;
} }



input:focus::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
color: #c5c4c4;
}

input:focus::-moz-placeholder {
/* Firefox 19+ */
color: #c5c4c4;
}

input:focus:-ms-input-placeholder {
/* IE 10+ */
color: #c5c4c4;
}

input:focus:-moz-placeholder {
/* Firefox 18- */
color: #c5c4c4;
}


.form flex { .form flex {
display: flex display: flex
} }
Expand Down

0 comments on commit 2ac9533

Please sign in to comment.