@salesforcedevs/docs-components 1.3.106-alpha.0 → 1.3.106-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.106-alpha.0",
3
+ "version": "1.3.106-alpha.1",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -196,19 +196,37 @@ export default class ContentLayout extends LightningElement {
196
196
  const contextNavEl = document.querySelector(
197
197
  "hgf-c360contextnav"
198
198
  ) as HTMLElement;
199
- const docHeaderEl = document.querySelector("doc-header") as HTMLElement;
199
+ const docHeaderEl = document.querySelector(
200
+ ".sticky-doc-header"
201
+ ) as HTMLElement;
202
+ const docPhaseEl = document.querySelector("doc-phase") as HTMLElement;
200
203
 
201
204
  if (!sidebarEl || !globalNavEl || !contextNavEl || !docHeaderEl) {
202
205
  console.warn("One or more required elements are missing.");
203
206
  return;
204
207
  }
205
208
 
206
- const totalOffsetHeight =
207
- globalNavEl.offsetHeight +
208
- contextNavEl.offsetHeight +
209
- docHeaderEl.offsetHeight;
209
+ const globalNavHeight =
210
+ globalNavEl.offsetHeight + contextNavEl.offsetHeight;
211
+ const docHeaderHeight = docHeaderEl.offsetHeight;
212
+
213
+ sidebarEl.style.setProperty(
214
+ "--dx-c-content-sidebar-sticky-top",
215
+ `${globalNavHeight + docHeaderHeight}px`
216
+ );
217
+ docHeaderEl.style.setProperty(
218
+ "--dx-g-global-header-height",
219
+ `${globalNavHeight}px`
220
+ );
210
221
 
211
- sidebarEl.style.top = `${totalOffsetHeight}px`;
222
+ if (docPhaseEl) {
223
+ docPhaseEl.style.setProperty(
224
+ "--doc-c-phase-top",
225
+ `${
226
+ globalNavHeight + docHeaderHeight + sidebarEl.offsetHeight
227
+ }px`
228
+ );
229
+ }
212
230
  };
213
231
 
214
232
  updateHighlighted = (event: Event): void =>
@@ -84,6 +84,7 @@ header:not(.has-brand) > .header_l2 {
84
84
  }
85
85
 
86
86
  .header_l2_group-title {
87
+ height: var(--dx-g-doc-header-main-nav-height);
87
88
  margin-right: 0;
88
89
  padding: var(--dx-g-spacing-smd)
89
90
  var(--dx-g-global-header-padding-horizontal);