Skip to content

Overriding Input components placeholder font-style #3185

Answered by SiTaggart
jared-hunter asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jhunter-twilio

You are so close! You can do everything you need via the elements object on the Customization Provider. It will accept css selectors as keys to each Element you target. And obviously you have to target the input HTML element itself.

So you would write something like

WORKER_TRANSFER_DIR_SEARCH_BOX_ELEMENT: {
  "&::placeholder": {
    fontStyle: "normal"
  }
}

At the end of the day, the object for WORKER_TRANSFER_DIR_SEARCH_BOX_ELEMENT is just a Emotion CSS style object. It can do everything Emotion can do with style objects, but we type some of the values to only be design tokens where necessary.

Here's a Code sandbox to show you what I mean to achieve overriding the pl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SiTaggart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants