-
Notifications
You must be signed in to change notification settings - Fork 371
Migrate more scss to styled components #870
Conversation
|
Deployed to: http://staging.quran.com:32960 |
| `; | ||
|
|
||
| const disabled = css` | ||
| opacity: 0.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent, if you use VS Code, it has support for styled-components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do. Hmm, not sure why didn't indent. Will fix
src/components/SurahInfo/index.js
Outdated
| import React, { PropTypes } from 'react'; | ||
| import * as customPropTypes from 'customPropTypes'; | ||
| import styled from 'styled-components'; | ||
| import { lighten } from 'polish'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean polished?
thabti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module 'polish' should be 'polished'
|
@sabeurthabti good catch. Weird my webpack didn't scream. |
|
@sabeurthabti PTAL. Fixed |
|
rebuild |
|
Deployed to: http://staging.quran.com:32962 |
Why?
Firstly, we have been using a hacky library called
webpack-isomorphic-toolsto get styles working on the server. There are alternatives now, such as getting webpack to serve server files but regardless this is a great opportunity to transition into css-in-js. What's most powerful about it is code-splitting CSS comes for free since it's in the JS bundle. Additionally, we will continue to make more DLS components that are easily customizable thanks to styled-components