You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove navigation report height for specific id (#746)
* feat(pfe-navigation): report pfe-nav's height in a global CSS variable
* update changelog
* change the height var to be more BEMy
* set nav height variable to use px
* fixed merge conflict
* fixed variable name in readme
* fixed typo in readme
* fixed nav test to use correct variable name
* set height custom property to use underscores only if region is declared.
* added px value back into variable.
* removed px string from custom height property to match clientHeight.
* Updated nav readme, fixed typo and replaced ellipses with colon
* removing logic for setting css variable for a nav with an id
* removing attribute listener for id again
* code revisions
Co-authored-by: Michael Clayton <[email protected]>
Co-authored-by: Chris Doherty <[email protected]>
Co-authored-by: Kendall Totten <[email protected]>
- `search`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders a dropdown in the navigation for the search functionality. Inside the tray for the slot, we recommend tagging the search form or search functionality that includes the input and submit button with the attribute `pfe-navigation--mobile-search`. The element inside the search slot that is tagged with this attribute will be copied into the mobile menu and appear above the accordion for the main navigation. Example:
24
+
- `search`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders a dropdown in the navigation for the search functionality. Inside the tray for the slot, we recommend tagging the search form or search functionality that includes the input and submit button with the attribute `pfe-navigation--mobile-search`. The element inside the search slot that is tagged with this attribute will be copied into the mobile menu and appear above the accordion for the main navigation. Example:
- `language`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders the dropdown for the user to select the site language. Example:
31
+
- `language`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders the dropdown for the user to select the site language. Example:
- `login`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders the dropdown for the user to log into the site. Example:
43
+
- `login`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders the dropdown for the user to log into the site. Example:
- `site-switcher`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders the dropdown for the site switcher, allowing the user to navigate an ecosystem of websites. Example:
54
+
- `site-switcher`: This slot can accept any html mark-up, however the `pfe-navigation-item` is recommended. When assigned to a navigation-item component, this slot renders the dropdown for the site switcher, allowing the user to navigate an ecosystem of websites. Example:
@@ -68,8 +68,7 @@ All slots are optional and can be left off if not needed. Slots prefixed with `m
68
68
69
69
### CSS Variables
70
70
71
-
- `--pfe-navigation--Height--actual`: when pfe-navigation initializes, it will create a global (on `body`) CSS variable that contains the height of the pfe-navigation item. The primary uses for this is calculating the offset for anchor links, and for positioning a sticky sub-header below the pfe-navigation. Note that multiple pfe-navigation elements will write the same variable, unless:
72
-
- `--pfe-navigation__${ID}--Height--actual`: like the previous variable, but if the pfe-navigation has an `id` attribute, it will be appended to the CSS variable name. This makes it possible to distinguish the heights of multiple pfe-navigation elements on the same page.
71
+
- `--pfe-navigation--Height--actual`: When `pfe-navigation` initializes, it will create a global (on `body`) CSS variable that contains the height of the `pfe-navigation` element. Possible uses include calculating the offset for anchor links or positioning a sticky sub-header below the `pfe-navigation`. Note that multiple `pfe-navigation` elements will write the same variable.
0 commit comments