Just a simple example of how to break down a task, a requested behavior and use the tasks to create CSS that will implemented wanted behavior.

Pulsing not filled out elements

I want required input elements to pulse when they do not have not any content . The puls effect should only apply when the element does not have focus .

Lets construct css selectors for that requirement:

  1. Match required input elements input[required]
  2. If placeholder is shown , it do not have any input :placeholder-shown
  3. Specify that we not want to include focus states :not(:focus)
  4. Result input[required]:placeholder-shown:not(:focus)

Example