-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style using CSS Modules #36
Conversation
For now, only set the font to monospace.
I just noticed
Here is a list of the stock fonts by platform. I think it should be |
Should we export the style from |
@@ -0,0 +1,20 @@ | |||
.container { |
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.
We should maybe start adding /** @format */
to style files. And check/format them with prettier.
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.
Good idea! Done with 686c0a3.
.babelrc
Outdated
[ | ||
"react-native-platform-specific-extensions", | ||
{ | ||
"extensions": ["native.scss", "css", "scss", "sass"] |
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.
Are ios.scss
and android.scss
missing from this list?
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.
Actually, there is no need for the native.scss
anyway so, removed with 74c88a6.
Platform-specific file resolution is not yet supported by the react-native-sass-transformer so, just use a common denominator. `monospace` is not supported on iO so, for now just use `courier` which is common between the platforms.
I changed
Done with 8d0821b for completeness. Will work on the rest of the feedback. |
Notice the code duplication between the block-holder.android.scss and block-holder.ios.scss files. This is needed because platform specific scss @import statements are not supported yet.
Since Flow+Haste can't properly resolve the platform-specific CSS Modules.
df60449
to
dd23ef4
Compare
Differentiated the platform specific font-family for the Code block with 583335d. Using In the meantime, Flow can't properly resolve the platform specific style files as well so, need to mock the module resolution for Flow too (see dd23ef4). |
I think I addressed all the feedback so far @maxme , ready for another pass, thanks! |
Something weird happens on iOS: https://bia.is/s/PQRr/style-sass-ios.mov Note: everything looks good in the |
It seems that `flex: 1` is not interpreted correctly (flexGrow ends up 0 which causes the list to effectively collapse on iOS. For some reason, it doesn't cause a problem on Android).
ccd5038
to
590fea5
Compare
! |
…ncy-installer-script-2 Removes a command that no longer exists from 'yarn clean:install'.
Start using SASS to define the styling of the views.
This solution is based on https://github.com/kristerkari/react-native-css-modules.
The idea here is to eventually be able to load the
.scss
files from the GB sourcetree, ideally with only some modifications/specializations.core/code
block is styled with settingfont-family
tomonospace
. See here..native.scss
versions of the SASS files