This changes how section visibility is controlled. All sections are still display:none by default.
Rather than becoming display:block when they match :target, they now become display:block if their ID matches the value of the root element's data-visible-section attribute - we hardcode the four section names "home", "running", "summary" and "details".
This lets us default to the home section just by setting <html data-visible-section="home"> in index.html, and we can avoid the :has selector.
Now Speedometer can run in older browsers which don't support :has.
Fixes #394.
This changes how section visibility is controlled. All sections are still
display:none
by default. Rather than becomingdisplay:block
when they match:target
, they now becomedisplay:block
if their ID matches the value of the root element'sdata-visible-section
attribute - we hardcode the four section names "home", "running", "summary" and "details".This lets us default to the home section just by setting
<html data-visible-section="home">
in index.html, and we can avoid the:has
selector.Now Speedometer can run in older browsers which don't support
:has
.