New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hiding-header

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hiding-header - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

dist/style.css

3

package.json
{
"name": "hiding-header",
"version": "0.3.4",
"version": "0.4.0",
"description": "Toggles header visibility on scroll.",

@@ -34,2 +34,3 @@ "main": "./dist/index.js",

"rollup": "^2.33.1",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-peer-deps-external": "^2.2.4",

@@ -36,0 +37,0 @@ "rollup-plugin-typescript2": "^0.29.0",

@@ -32,26 +32,4 @@ # Hiding Header [![npm](https://img.shields.io/npm/v/hiding-header.svg)](https://www.npmjs.com/package/hiding-header) [![Dependencies](https://img.shields.io/david/FilipChalupa/hiding-header.svg)](https://www.npmjs.com/package/hiding-header?activeTab=dependencies) ![npm type definitions](https://img.shields.io/npm/types/hiding-header.svg)

```css
.hidingHeader {
position: relative;
--hidingHeader-height: auto;
--hidingHeader-bounds-height: auto;
--hidingHeader-animation-offset: 0px;
z-index: 10;
height: var(--hidingHeader-bounds-height);
margin-bottom: calc(
var(--hidingHeader-height) - var(--hidingHeader-bounds-height)
);
pointer-events: none;
}
Import `dist/style.css` to your CSS. It's few lines of code. You can alternatively copy paste it and adjust things like `z-index` to your needs.
.hidingHeader-in {
position: relative;
position: sticky;
top: 0;
pointer-events: auto;
transition: transform 0.2s;
transform: translateY(var(--hidingHeader-animation-offset));
}
```
### JavaScript:

@@ -58,0 +36,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