Skip to content

Commit

Permalink
Add note on SCSS' overloaded rgba() function
Browse files Browse the repository at this point in the history
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).
bbbrrriiiaaannn committed Mar 24, 2015
1 parent 20c1914 commit 5eaca69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guidelines.md
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ Make use of `<thead>`, `<tfoot>`, `<tbody>`, and `<th>` 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.

0 comments on commit 5eaca69

Please sign in to comment.