Question: I’m not even sure how exactly to phrase this question, so let me try to put it into some code:

Suppose I have a div element that I want to animate, so I give it two styles:

```css
#myElement {
  width: 100px;
  height: 100px;
  background: red;
}
#myElement:hover {
  width: 150px;
  height: 150px;
  background: green;
  transition: 1s;
}
```

```html
<div id="myElement"></div>
```

Why does it matter which style I apply the `transition` property to?

If I apply it to the default style, everything works correctly, the transition works both ways, when it changes state from default to hovering, and vice-versa. But when I apply it to the `:hover` instead, it only works from default to hover, but *not* the other way, it just jumps back instantly.

Why does this happen, what are the semantics of the transition property? (And is semantics even the right term here?)

If it was: “Whenever changing *from* this state to another, apply the transition.” Why is the transition also happening from hover to default when applied to default only?

And it can’t be ”Whenever changing *to* this state from another, apply the transition.” because then it wouldn’t work from default to hover.

So what is it?

Is there some kind of inheritance going on?

I found plenty of resources on how to apply a transition, syntax etc., but I couldn’t find anything where this behaviour is explained.

---

Edit: I guess I was too focused on the transition property and didn't look into "inheritance" for pseudo classes.
So if I put the transition into the default state, :hover inherits it.
Also I somehow thought it would only be in the :hover state once the transition is completed, which is wrong.
Here is a different scenario, without "inheritance" if anyone is still confused:
<https://jsfiddle.net/xu6Lsexr/1/>

Thanks for clarifiying this for me!

Answer: 
`brew install graphviz`

then:

> 
> `pip install --install-option="--include-path=/usr/local/include/" --install-option="--library-path=/usr/local/lib/" pygraphviz`
> 
> 
> Both path in bold should NOT contain "graphviz".
> 
> 
> 

<https://github.com/pygraphviz/pygraphviz/issues/100#issuecomment-237560404>

Worked for me on OSX 10.14.1
Assuming that you've already installed *graphviz* software:

As described in [this blog post](http://www.alexandrejoseph.com/blog/2016-02-10-install-pygraphviz-mac-osx.html) use the following parameters whilst trying to run `pip install pygraphviz`

```
--install-option="--include-path=/usr/local/include/graphviz/" \
--install-option="--library-path=/usr/local/lib/graphviz"

```

So the final command would look like `pip install pygraphviz --install-option="--include-path=/usr/local/include/graphviz/" --install-option="--library-path=/usr/local/lib/graphviz"`.

What this does is this explicitly specified where the libraries of the original program (graphviz) exist for the python extension to use. Unfortunately, this doesn't seem to get automatically recognized.

Worked on MacOS Sierra with Python 3.6