Skip to content

Instantly share code, notes, and snippets.

@Skateside
Skateside / breakout.css
Last active August 25, 2021 11:07
Making 100vw take up the whole width without a horizontal scrollbar or overflow:hidden
/* https://css-tricks.com/full-width-containers-limited-width-parents/#no-calc-needed */
/* "No calc() needed" now with added calc()! */
.breakout {
--main-bar: var(--scroll-bar, 0px);
--main-half-bar: calc(var(--main-bar) / 2);
width: 100vw;
width: calc(100vw - var(--main-bar));
position: relative;
left: 50%;
right: 50%;
@Skateside
Skateside / lib.object-hasown-groupby.d.ts
Last active January 26, 2024 22:58
Just thinking aloud about re-writing the Pocket Grimoire
export {}
declare global {
interface ObjectConstructor {
/**
* Checks to see if the given property is in the given object.
* @param object Object to check in.
* @param property Property to check for.