Avoid :has selector in CSS. (#395)

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`.
3 files changed
tree: 3865d95fa555ce2c8c88e1751dc87df14c4ca302
  1. .github/
  2. resources/
  3. tests/
  4. .eslintignore
  5. .eslintrc
  6. .gitignore
  7. .npmrc
  8. .prettierignore
  9. .prettierrc
  10. about.html
  11. babel.config.json
  12. Development.md
  13. Governance.md
  14. index.html
  15. instructions.html
  16. InteractiveRunner.html
  17. LICENSE
  18. package-lock.json
  19. package.json
  20. README.md
  21. Testing.md
README.md

What is Speedometer?

Speedometer is a benchmark for web browsers that measures Web application responsiveness by timing simulated user interactions on various workloads. Our primary goal is to make it reflect the real-world Web as much as possible. When a browser improves its score on the benchmark, actual users should benefit. In order to achieve this, it should:

  • Test end-to-end user journeys instead of testing specific features in a tight loop. Each test should exercise the full set of what’s needed from the engine in order for a user to accomplish a task.
  • Evolve over time, adapting to the present Web on a regular basis. This should be informed by current usage data, and by consensus about features which are important for engines to optimize to provide a consistent experience for users and site authors.
  • Be accessible to the public and useful to browser engineers. It should run in every modern browser by visiting a normal web page. It should run relatively quickly, while providing enough test coverage to be reflective of the real-world Web.