File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
public_html/wp-content/mu-plugins Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ function canonical_link_past_home_pages_to_current_year() {
7171 */
7272function add_notification_styles () { ?>
7373 <style type="text/css">
74- html:not(#specificity-hack) {
74+ html:not(#specificity-hack),
75+ .wordcamp-latest-site-notify-fixed-position-fix {
7576 /* 44 = 10px x2 for padding, 24px for line height. */
7677 margin-top: calc(44px + var(--wp-admin--admin-bar--height, 0px)) !important;
7778 }
@@ -110,6 +111,23 @@ function add_notification_styles() { ?>
110111 color: #72aee6;
111112 }
112113 </style>
114+ <script>
115+ document.addEventListener("DOMContentLoaded", (event) => {
116+ const fixedElements = document.querySelectorAll('nav, nav *'); // Select all elements
117+ const fixedElementsArray = Array.from(fixedElements);
118+
119+ const fixedElementsWithPositionFixed = fixedElementsArray.filter(element => {
120+ const computedStyle = getComputedStyle(element);
121+ return computedStyle.position === 'fixed';
122+ });
123+
124+ console.log(fixedElementsWithPositionFixed);
125+
126+ fixedElementsWithPositionFixed.forEach(element => {
127+ element.classList.add('wordcamp-latest-site-notify-fixed-position-fix')
128+ });
129+ });
130+ </script>
113131<?php }
114132
115133/**
You can’t perform that action at this time.
0 commit comments