
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
dotsunited-off-canvas-navigation
Advanced tools
Off-Canvas Navigation utilities.
With webpack:
var setup = require('dotsunited-off-canvas-navigation/lib/setup');
setup('off-canvas-navigation');
@import "~dotsunited-off-canvas-navigation/lib/mixins";
.off-canvas-navigation-button {
.dotsunited-off-canvas-navigation-button(off-canvas-navigation);
// Custom styles
position: absolute;
top: 10px;
right: 10px;
}
.off-canvas-navigation-menu {
.dotsunited-off-canvas-navigation-menu(off-canvas-navigation);
}
.off-canvas-navigation-backdrop {
.dotsunited-off-canvas-navigation-backdrop(off-canvas-navigation);
}
<button
aria-label="Open navigation"
aria-controls="off-canvas-navigation-menu"
aria-expanded="false"
class="off-canvas-navigation-button"
data-off-canvas-navigation-toggle
>
<span><span></span></span>
</button>
<div aria-hidden="true" class="off-canvas-navigation-backdrop"></div>
<section
id="off-canvas-navigation-menu"
aria-hidden="true"
class="off-canvas-navigation-menu"
>
<nav>
<ul>
<li>...</li>
</ul>
</nav>
</section>
To change the size of the button, just set a different width and height for the
first nested <span>
.
@import "~dotsunited-off-canvas-navigation/lib/mixins";
.off-canvas-navigation-button {
.dotsunited-off-canvas-navigation-button(off-canvas-navigation);
> span {
width: 100px;
height: 90px;
}
}
Copyright (c) 2015-2016 Dots United GmbH. Released under the MIT license.
FAQs
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.