Pros
Cons
-
It's pure CSS.
-
All links need to have a consistent dimensions for this to work
-
You have to set everything up yourself in terms of telling the nav how many items there are and where the
.line
should move to whenever one of the links gets hovered.
Notes
-
This uses Custom Properties, Calc, and Grid.
-
While I couldn't find an easier way to make the line work with unevenly sized links, I tried my best to compensate for it by including the
--width
and
--left
custom properties, both of which would take priority over the current setup should either be defined.