From 5eaca6910d4f2e510c5d71404f26c7dcec87882d Mon Sep 17 00:00:00 2001 From: "B. Seward" Date: Tue, 24 Mar 2015 03:10:39 -0700 Subject: [PATCH] Add note on SCSS' overloaded rgba() function Sass + SCSS overrides and overloads the [rgba() function](http://sass-lang.com/documentation/Sass/Script/Functions.html#rgba-instance_method) so it can also take parameters in the format `rgba($color, $alpha)`, e.g. `rgba(#000, .5)`. It'd be pragmatic to leverage that overload and use hex colors that much more consistently in SCSS. If GitHub folks aren't writing much raw CSS this line can be trimmed further, ```* Use hex color codes `#000` (SCSS' `rgba()` function is overloaded to accept hex colors as a param, e.g., `rgba(#000, .5)`).``` (since Sass' overriding of `rgba()` isn't obvious perhaps good to spell it out explicitly here). --- docs/guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guidelines.md b/docs/guidelines.md index 0089991f66..5f13c6336c 100644 --- a/docs/guidelines.md +++ b/docs/guidelines.md @@ -108,7 +108,7 @@ Make use of ``, ``, ``, and `` tags (and `scope` attrib ### Formatting -* Use hex color codes `#000` unless using `rgba()`. +* Use hex color codes `#000` unless using `rgba()` in raw CSS (SCSS' `rgba()` function is overloaded to accept hex colors as a param, e.g., `rgba(#000, .5)`). * Use `//` for comment blocks (instead of `/* */`). * Avoid specifying units for zero values, e.g., `margin: 0;` instead of `margin: 0px;`. * Strive to limit use of shorthand declarations to instances where you must explicitly set all the available values.