npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bootstrap-spillout

v1.0.0

Published

Easy overflow of elements from inside the Bootstrap container to the edge of the viewport

Downloads

4

Readme

---Bootstrap Spillout - BSS---

--Thinking outside of the box--

  • Container bound content that reaches the edge of the viewport made easy

| +----------------------------------------------------------+ | | | Container | | | | +--------------------------++---------------------------------------------+ | | | | || | | | | | .col-6 || .spill-6-end | | | | | || | | | | +--------------------------++---------------------------------------------+ | | | | | | +----------------------------------------------------------+ |

---What is the use-case?---

One of the common designer tropes is to have regular content be bound withing the container but to have images break out of the container and reaching the end of the screen.

While it looks nice and helps break the monotiny of having everything centered on the screen within the container, it poses a bit of a challange on the development side.

---Common solutions---

One option is to set the spilling element absolutely within the container or a column inside the container.

The issue with this approach is having to compensate for the fact that the absolutely placed element is no longer in the document flow and it's height does not effect the parent element.


An another option is to us JS to add a negative margin to the desired element.

To avoid complication and for the sake of performance it is best to keep the js visual adjustemnts to a minimum.


One other option is to stretch the container to the desired edge of the screen but that offsets the center of the container which in turn missaligns the rest of the grid.

---The benefits of Boostrap-Spillout---

BSS allows you to both keep the existing grid intact while retaining the ease of use or regular columns via classes and remaining in the flow of the document and using minimal JS.

BSS folows Bootstrap's responsive mixin approach and can be disabled at any breakpoint.

---How to use--- Include the BSS scss to your main style scss after the Bootstrap scss since it uses Bootstrap's scss variables and compile it.

Include the BSS JS to your project and add bssInit() to the top of your window.onload / document.ready function.

Example class: .spill-md-6-end

  • The main part and the starting point is 'spill' which takes a similar role and function as 'col'.
  • The second part is the breakpoint designator (sm, md, lg, etc.) just like with Bootstrap. If the breakpoint is not included, the element will behave the same throughout all of the breakpoints.
  • The third part is the number of columns of the regular container the spill element will take up.
  • The final part is the side designator. It can be either 'start', 'end' or 'none'. The 'none' designator makes the spill element act like a regular column.