1

I have next element with placeholder:

<ui-select-match placeholder="My hint">
    {{$someItem}}
</ui-select-match>

and I need to change placeholder's text style to bold, italic, etc. I am new in css, so not sure how to do it in a proper way.

31piy
  • 23,323
  • 6
  • 47
  • 67
Ted
  • 1,682
  • 3
  • 25
  • 52
  • Here is a cross browser workaround I made: https://stackoverflow.com/a/44333787/2827823 – Asons Jun 22 '17 at 12:10
  • Check this post answer in a similar question to understand more and adjust your css code to be recognised in all browsers [Change an HTML5 input's placeholder color with CSS](https://stackoverflow.com/questions/2610497/change-an-html5-inputs-placeholder-color-with-css?answertab=active#tab-top) – Vasiliki M. Jun 22 '17 at 13:05
  • thanks, that's works for me – Ted Jun 22 '17 at 13:26

2 Answers2

3

You can use pseudo code but be aware this is not standardized. For more information have a look here.

input::placeholder {
  color: darkorange;
}
<input type="text" placeholder="test">
Gerard
  • 15,418
  • 5
  • 30
  • 52
  • I do not see any CSS there – Gerard Jun 22 '17 at 12:29
  • Try this and you can see no change in `placeholder` text - `ui-select-match::placeholder { color: darkorange; }` – Utkarsh Dubey Jun 22 '17 at 12:34
  • Obviously not, because that code is wrong. Without the first placeholder word you may have more luck. Right now i am driving and typing which is not a good combination so I will look at it later – Gerard Jun 22 '17 at 12:47
2

You can try this:

.ui-select-placeholder{
  color:pink;
}

Thanks!

Utkarsh Dubey
  • 703
  • 11
  • 31