MDN: Content first (Header to Footer)

Moves main content to the top, so the header with dropdown menus lands above footer.

  1. /* ==UserStyle==
  2. @name MDN: Content first (Header to Footer)
  3. @description Moves main content to the top, so the header with dropdown menus lands above footer.
  4. @namespace myfonj
  5. @version 1.0.5
  6. @license CC0 - Public Domain
  7. ==/UserStyle== */
  8. @-moz-document domain("developer.mozilla.org") {
  9. /*
  10. https://gf.qytechs.cn/en/scripts/409087/versions/new
  11. 2020-12-15 they switched to "signle column grid"
  12. With explicity set template-row, that matches matural source order.
  13. Makes no sense to me. Education? Showing off? Questions…
  14. You know what?
  15. Flexbox is fine. I think. Natural order, no need to keep track, no overlays.
  16. 2021-03-11 switched to shallow grid with aside and main besides each other
  17. */
  18. /*
  19. § First row (header): move after content
  20. both header and footer have z-index of 9999
  21. https://github.com/mdn/yari/blob/c8e3837e2646d4433ad97899afcbd1ced94e3b0f/client/src/ui/organisms/header/index.scss#L58
  22. increasing is necessary foro dropdowns to not be covered with following footer
  23. */
  24. .document-page .page-header {
  25. grid-row: 8/9; /* was 1/2 */
  26. z-index: 10000;
  27. }
  28. /*
  29. § Breadcrumbs: stick to top
  30. */
  31. .breadcrumb-locale-container {
  32. margin: 0;
  33. }
  34. /*
  35. § Breadcrumbs: Hide last (current) item
  36. Redundant: URL is already in location bar, text is in H1
  37. * OFF /
  38. .breadcrumb-locale-container nav li:nth-last-child(1) {
  39. display: none;
  40. }
  41. .breadcrumb-locale-container nav li:nth-last-child(2) a::after{
  42. --REM: 'caron separator';
  43. content: none;
  44. }
  45. /*
  46. § Footer: decrease z-index to get visible search suggestions dropdown
  47. */
  48. .nav-footer {
  49. z-index: 200;
  50. }
  51. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址