@salesforcedevs/docs-components 1.3.106-alpha.3 → 1.3.106-alpha.5
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
|
@@ -210,32 +210,34 @@ export default class ContentLayout extends LightningElement {
|
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
docHeaderEl.style.setProperty(
|
|
222
|
-
"--dx-g-global-header-height",
|
|
223
|
-
`${globalNavHeight}px`
|
|
224
|
-
);
|
|
225
|
-
|
|
226
|
-
// If doc phase element exists, we need to account for its sticky position. Mobile should include the sidebar height (since it becomes sticky aswell).
|
|
227
|
-
if (docPhaseEl) {
|
|
228
|
-
docPhaseEl.style.setProperty(
|
|
229
|
-
"--doc-c-phase-top",
|
|
230
|
-
`${
|
|
231
|
-
window.innerWidth <= 769
|
|
232
|
-
? globalNavHeight +
|
|
233
|
-
docHeaderHeight +
|
|
234
|
-
sidebarEl.offsetHeight
|
|
235
|
-
: globalNavHeight + docHeaderHeight
|
|
236
|
-
}px`
|
|
213
|
+
// sync with the browser to account for any reflows that may have happened
|
|
214
|
+
requestAnimationFrame(() => {
|
|
215
|
+
const globalNavHeight =
|
|
216
|
+
globalNavEl.offsetHeight + contextNavEl.offsetHeight;
|
|
217
|
+
const docHeaderHeight = docHeaderEl.offsetHeight;
|
|
218
|
+
sidebarEl.style.setProperty(
|
|
219
|
+
"--dx-c-content-sidebar-sticky-top",
|
|
220
|
+
`${globalNavHeight + docHeaderHeight}px`
|
|
237
221
|
);
|
|
238
|
-
|
|
222
|
+
docHeaderEl.style.setProperty(
|
|
223
|
+
"--dx-g-global-header-height",
|
|
224
|
+
`${globalNavHeight}px`
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
// If doc phase element exists, we need to account for its sticky position. Mobile should include the sidebar height (since it becomes sticky aswell).
|
|
228
|
+
if (docPhaseEl) {
|
|
229
|
+
docPhaseEl.style.setProperty(
|
|
230
|
+
"--doc-c-phase-top",
|
|
231
|
+
`${
|
|
232
|
+
window.innerWidth < 769
|
|
233
|
+
? globalNavHeight +
|
|
234
|
+
docHeaderHeight +
|
|
235
|
+
sidebarEl.offsetHeight
|
|
236
|
+
: globalNavHeight + docHeaderHeight
|
|
237
|
+
}px`
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
239
241
|
};
|
|
240
242
|
|
|
241
243
|
updateHighlighted = (event: Event): void =>
|
|
@@ -8,7 +8,7 @@ import { track } from "dxUtils/analytics";
|
|
|
8
8
|
|
|
9
9
|
const TABLET_MATCH = "980px";
|
|
10
10
|
const MOBILE_MATCH = "880px";
|
|
11
|
-
const SMALL_MOBILE_MATCH = "
|
|
11
|
+
const SMALL_MOBILE_MATCH = "768px";
|
|
12
12
|
|
|
13
13
|
export default class Header extends HeaderBase {
|
|
14
14
|
@api langValuePath: string = "id"; // allows to override how language property is interpreted, follows valuePath dropdown api.
|