{"absolute_url": "/geekyjohn/rgba-less-mixin/", "blog_post": false, "code": "\n/***************************\n RGBA Background Colours\n***************************/\n\n.rgba(@r, @g, @b, @alpha) {\n @colour: rgb(@r, @g, @b);\n @alphaColour: hsla(hue(@colour), saturation(@colour), lightness(@colour), @alpha);\n @alphaColour: rgba(@r, @g, @b, @alpha);\n @ieAlphaColour: argb(@alphaColour);\n \n background-color: @colour; // Fallback for older browsers\n // This will be ignored by browsers that don't support it.\n background-color: @alphaColour;\n \n // OldIE hacks\n .lt-ie9 & { //assumes you have conditional commented tags\n zoom: 1; // hasLayout\n background-color: transparent;\n -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})\"; // IE 8+\n filter: ~\"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})\"; // IE 6 & 7\n }\n \n}", "created": "2013-02-23T04:08:34.078173", "description": "A mixin to facilitate cross-browser alpha background colours", "description_rendered": "A mixin to facilitate cross-browser alpha background colours", "embed_url": "https://snipt.net/embed/f3c328cf4d72be7d4ed71fec873413bc/", "full_absolute_url": "/geekyjohn/rgba-less-mixin/", "id": 56264, "lexer": "scss", "line_count": 24, "log_entries": [], "meta": null, "modified": "2019-06-19T06:39:01.439377", "publish_date": "2013-02-23T04:11:35.290835", "raw_url": "/raw/f3c328cf4d72be7d4ed71fec873413bc/", "resource_uri": "/api/public/snipt/56264/", "slug": "rgba-less-mixin", "stylized": "
 1\n 2\n 3\n 4\n 5\n 6\n 7\n 8\n 9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23
/***************************\n RGBA Background Colours\n***************************/\n\n.rgba(@r, @g, @b, @alpha) {\n    @colour: rgb(@r, @g, @b);\n    @alphaColour: hsla(hue(@colour), saturation(@colour), lightness(@colour), @alpha);\n    @alphaColour: rgba(@r, @g, @b, @alpha);\n    @ieAlphaColour: argb(@alphaColour);\n    \n    background-color: @colour; // Fallback for older browsers\n    // This will be ignored by browsers that don't support it.\n    background-color: @alphaColour;\n    \n    // OldIE hacks\n    .lt-ie9 & { //assumes you have conditional commented <html> tags\n        zoom: 1; // hasLayout\n        background-color: transparent;\n        -ms-filter:  "progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})"; // IE 8+\n        filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})"; // IE 6 & 7\n    }\n    \n}\n
\n
", "tags": [{"absolute_url": "/public/tag/rgba/", "id": 3554, "name": "rgba", "resource_uri": "/api/public/tag/3554/", "snipts": "/api/public/snipt/?tag=3554"}, {"absolute_url": "/public/tag/mixin/", "id": 4510, "name": "mixin", "resource_uri": "/api/public/tag/4510/", "snipts": "/api/public/snipt/?tag=4510"}, {"absolute_url": "/public/tag/less/", "id": 6213, "name": "less", "resource_uri": "/api/public/tag/6213/", "snipts": "/api/public/snipt/?tag=6213"}, {"absolute_url": "/public/tag/cross-browser_1/", "id": 7762, "name": "cross browser", "resource_uri": "/api/public/tag/7762/", "snipts": "/api/public/snipt/?tag=7762"}], "title": "rgba Less mixin", "user": {"absolute_url": "/geekyjohn/", "email_md5": "2d55cb18d904a91156331e5f089012d3", "id": 7691, "resource_uri": "/api/public/user/7691/", "snipts": "/api/public/snipt/?user=7691", "snipts_count": 46, "username": "geekyjohn"}}