I expected this to happen upon entering and exiting the darkened state, but upon transition it only goes over. How can I make a transition as I type? I also tried ease-inand ease-out, but they don't seem to matter.
ease-in
ease-out
.is-dimmed-unless-active:not(:active):not(:focus):not(:hover) { opacity: .5; transition: opacity .5s ease-in-out; }
Live example of the problem http://codepen.io/ryanve/pen/doKdgW
Since you need to define transitionon .card:
transition
.card
.card { transition: opacity .5s ease-in-out; }
Instead of this:
.is-dimmed-unless-active:not(:active):not(:focus):not(:hover) { transition: opacity .5s ease-in-out; }
Change css to this:
.is-dimmed-unless-active { transition: opacity .5s ease-in-out; opacity: 1; } .is-dimmed-unless-active:hover { opacity: .5; } .card { width: 60%; margin: 1em auto; padding: 1em; color: crimson; border: 3px dotted crimson; } body { font-family: sans-serif; background: white; }