Skip to content

Instantly share code, notes, and snippets.

View olmokramer's full-sized avatar
💭
#codegradelife

Olmo Kramer olmokramer

💭
#codegradelife
View GitHub Profile
// background transparency
background-transparency(color, alpha = 1)
ms-color = argb(color, alpha)
background rgb(color)
background rgba(color, alpha)
.lt-ie8 &
zoom 1
.lt-ie9 &
background transparent
filter s('progid:DXImageTransform.Microsoft.gradient(startColorstr=%s,endColorstr=%s)', ms-color, ms-color)
@olmokramer
olmokramer / css-color-regex
Last active December 9, 2023 12:52
Regex for CSS colors: hex, rgb(a), hsl(a)
/(#([0-9a-f]{3}){1,2}|(rgba|hsla)\(\d{1,3}%?(,\s?\d{1,3}%?){2},\s?(1|0?\.\d+)\)|(rgb|hsl)\(\d{1,3}%?(,\s?\d{1,3}%?\)){2})/i