Skip to content

Commit 17be671

Browse files
Robert Spencerfacebook-github-bot
Robert Spencer
authored andcommitted
Nicer formatting of gists in docs
Summary: The gists in the docs have large margins to fit with the front page. This diff specialises that margin setting and sets it to something smaller for other gists. Reviewed By: emilsjolander Differential Revision: D4666016 fbshipit-source-id: 5121849a153e78d523b33e10b96641426e794f8d
1 parent abf912b commit 17be671

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

docs/_docs/api/android.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ layout: docs
55
permalink: /docs/api/android/
66
---
77

8-
There is an easy interface to Yoga called `YogaLayout`. This is a view group that lays out its children using Yoga. We recommend looking at the sample app for details on its usage. However, as an overview you can simply define XML layouts such as
8+
To include the java bindings and `.so` libraries, add to your build:
9+
<script src="https://gist.github.com/rspencer01/e3cb51e789147b359d842aac6fa30f9f.js"></script>
910

11+
There is an easy interface to Yoga called `YogaLayout`. This is a view group that lays out its children using Yoga. We recommend looking at the sample app for details on its usage. However, as an overview you can simply define XML layouts such as
1012
<script src="https://gist.github.com/rspencer01/c1964b98f0c60de7c49683a049ed0640.js"></script>
1113

1214
Note that there are some caveats, such as requiring the custom `YogaLayoutViewFactory` in order to have tags `YogaLayout` instead of `com.facebook.samples.yoga.YogaLayout`.
1315

16+
To include this in your project, add to your build:
17+
<script src="https://gist.github.com/rspencer01/499a9e02185985bf3167f818d9c3398f.js"></script>
18+
1419
## layout\_width and layout\_height
1520

1621
If either are set to an actual size (in px or dp etc) then this is taken as a default for `yoga:height` or `yoga:width`. Otherwise they are ignored.

docs/_sass/_yoga.scss

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
}
3030

3131
.gist {
32+
margin: 5px;
33+
margin-left: 0px;
34+
margin-right: 0px;
35+
}
36+
37+
.gistsample > .gist {
3238
width: 600px;
3339
margin: 50px;
3440
margin-left: 0px;

0 commit comments

Comments
 (0)