Socket
Socket
Sign inDemoInstall

@salesforcedevs/docs-components

Package Overview
Dependencies
Maintainers
0
Versions
625
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforcedevs/docs-components - npm Package Compare versions

Comparing version 1.3.300-scroll-alpha2 to 1.3.300-scroll-alpha3

2

package.json
{
"name": "@salesforcedevs/docs-components",
"version": "1.3.300-scroll-alpha2",
"version": "1.3.300-scroll-alpha3",
"description": "Docs Lightning web components for DSC",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -240,2 +240,10 @@ /* eslint-disable @lwc/lwc/no-document-query */

const docHeaderHeight = docHeaderEl.getBoundingClientRect().height;
const totalHeaderHeight = globalNavHeight + docHeaderHeight + 40;
// Selecting the doc section heading and RNB here.
const docHeadingEls = Array.from(
document.querySelectorAll("doc-heading")
);
const rightNavBarEl = this.template.querySelector(".right-nav-bar");
sidebarEl.style.setProperty(

@@ -251,2 +259,22 @@ "--dx-c-content-sidebar-sticky-top",

// Adjusting the doc section heading on scroll.
docHeadingEls.forEach((docHeadingEl) => {
(docHeadingEl as any).style.scrollMarginTop = docPhaseEl
? `${
totalHeaderHeight +
docPhaseEl.getBoundingClientRect().height
}px`
: `${totalHeaderHeight}px`;
});
// Adjusting the right nav bar on scroll.
if (rightNavBarEl) {
rightNavBarEl.style.top = docPhaseEl
? `${
totalHeaderHeight +
docPhaseEl.getBoundingClientRect().height
}px`
: `${totalHeaderHeight}px`;
}
// If doc phase element exists, we need to account for its sticky position. Mobile should include the sidebar height (since it becomes sticky aswell).

@@ -264,27 +292,2 @@ if (docPhaseEl) {

);
// Adjust scroll margin for doc headings when doc phase is present
const docHeadingEls = Array.from(
document.querySelectorAll("doc-heading")
);
docHeadingEls.forEach((docHeadingEl) => {
(docHeadingEl as any).style.scrollMarginTop = `${
globalNavHeight +
docHeaderHeight +
docPhaseEl.getBoundingClientRect().height +
40
}px`;
});
// Adjust right nav bar position when doc phase is present
const rightNavBarEl =
this.template.querySelector(".right-nav-bar");
if (rightNavBarEl) {
rightNavBarEl.style.top = `${
globalNavHeight +
docHeaderHeight +
docPhaseEl.getBoundingClientRect().height
}px`;
}
}

@@ -291,0 +294,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc