Files

13 lines
855 B
TypeScript

// Chamfered (cut) corners — the HiveGrid brand card shape (echoes the honeycomb).
//
// Applied as an INLINE clip-path style (not a CSS utility class) on purpose: it
// ships in the JS bundle, so it is immune to CSS caching and always matches the
// product-page feature cards, which use the same 16px cut.
//
// Caveats of clip-path — a chamfered surface must satisfy these or it looks broken:
// • it also clips box-shadow → shadowed cards keep their shadow via filter: drop-shadow()
// • it also clips the border → drop the border and fill with a bg colour instead
// • it clips children that escape the box (drag handles, popups, tooltips) → don't chamfer those
export const CHAMFER =
"polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px)";