Skip to content

Commit 71a2b12

Browse files
committed
Add CSS-in-JavaScript section
We have been writing CSS in JavaScript and have developed a set of best practices around this type of thing. I thought it would be nice to publish this document alongside our other JavaScript style guide documents.
1 parent 3a7210e commit 71a2b12

2 files changed

Lines changed: 435 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Other Style Guides
1010
- [ES5 (Deprecated)](https://github.com/airbnb/javascript/tree/es5-deprecated/es5)
1111
- [React](react/)
12+
- [CSS-in-JavaScript](css-in-javascript/)
1213
- [CSS & Sass](https://github.com/airbnb/css)
1314
- [Ruby](https://github.com/airbnb/ruby)
1415

@@ -2218,7 +2219,7 @@ Other Style Guides
22182219
- [19.2](#commas--dangling) Additional trailing comma: **Yup.** eslint: [`comma-dangle`](http://eslint.org/docs/rules/comma-dangle.html) jscs: [`requireTrailingComma`](http://jscs.info/rule/requireTrailingComma)
22192220

22202221
> Why? This leads to cleaner git diffs. Also, transpilers like Babel will remove the additional trailing comma in the transpiled code which means you don't have to worry about the [trailing comma problem](es5/README.md#commas) in legacy browsers.
2221-
2222+
22222223
```javascript
22232224
// bad - git diff without trailing comma
22242225
const hero = {

0 commit comments

Comments
 (0)