Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
@wildebeest/scroll
Advanced tools
Readme
Enables scrolling in absolute and fixed elements
npm install --save @wildebeest/scroll
It's usefull to know these libraries:
After the application starts with app.run([ScrollModule])
you can create scroll boxes. ScrollBox
is enabled by creating new instance of this class. First select DOM element that is suppous to became scrollale and then create new instance of ScrollBox
an `initialize it.
let app: Application = new Application();
app.run([ScrollBox]);
let element: HTMLElement = document.querySelector('.scroll-box');
let scrollBox: ScrollBox = app.getContainer().get(ScrollBox);
scrollBox.initialize(element, {});
Second, initialize parameter allows you to customize behavior of this scroll box.
ScrollBar and ScrollMark will have scroll-bar
and scroll-bar__mark
css class by default. You should add style to those two classes in your css file.
.scroll-box {
position: absolute;
overflow: hidden;
}
.scroll-box--hover:hover .scroll-bar, .scroll-box--show .scroll-bar, .scroll-box--always-show .scroll-bar {
transform: translateX(0%);
}
.scroll-bar {
position: absolute;
width: 4px;
right: 0px;
top: 0px;
height: 100%;
transform: translateX(100%);
transition: transform ease 160ms;
}
.scroll-bar__mark--move {
cursor: move;
}
.scroll-bar__mark {
position: absolute;
width: 4px;
right: 0px;
top: 50%;
cursor: grab;
}
ScrollBox emits wbScroll
event that contains 4 values:
This module should be highly customizable. You can add your own css classes and change visuals.
To add specific class to all scroll bars, just set template for creating scroll bars.
let app: Application = new Application();
app.run([ScrollModule]);
let builder: ComponentBuilder = app.getContainer().getNamed('ComponentBuilder', 'scroll-bar');
builder.setTemplate('<div class="my-scroll-bar-class"></div>');
Scroll mark is a litle nob that moves inside of scroll bar. To add specific class to all scroll marks, just set template for creating scroll marks.
let app: Application = new Application();
app.run([ScrollModule]);
let builder: ComponentBuilder = app.getContainer().getNamed('ComponentBuilder', 'scroll-mark');
builder.setTemplate('<div class="my-scroll-mark-class"></div>');
FAQs
Scroll element with custom scroll bar
The npm package @wildebeest/scroll receives a total of 3 weekly downloads. As such, @wildebeest/scroll popularity was classified as not popular.
We found that @wildebeest/scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.