Skip to content

Instantly share code, notes, and snippets.

View toddcarpenter's full-sized avatar

Todd Carpenter toddcarpenter

View GitHub Profile
@toddcarpenter
toddcarpenter / ellipsis.scss
Created April 17, 2023 17:30
Cross browser ellipsis
// Cross browser Ellipsis '...' - fades text on unsupported browsers
// Turning off 'autoprefixer' because it will remove deprecated properties (-webkit-box-orient) that still work in webkit browsers
// Fallback is determined by checking @supports below
// Pass 'true' to enable a fixed-height which is determined by the line-height multiplied by the number of lines. This is useful to give equal height to card type elements that are side-by-side
@mixin ellipsis($ellipsis-line-height, $fixed-height: 'false') {
display: block;
display: -webkit-box;
/* autoprefixer ignore next */
-webkit-box-orient: vertical;
position: relative;