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
This commit is contained in:
committed by
Facebook Github Bot
parent
abf912b729
commit
17be6718ee
@@ -5,12 +5,17 @@ layout: docs
|
||||
permalink: /docs/api/android/
|
||||
---
|
||||
|
||||
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
|
||||
To include the java bindings and `.so` libraries, add to your build:
|
||||
<script src="https://gist.github.com/rspencer01/e3cb51e789147b359d842aac6fa30f9f.js"></script>
|
||||
|
||||
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
|
||||
<script src="https://gist.github.com/rspencer01/c1964b98f0c60de7c49683a049ed0640.js"></script>
|
||||
|
||||
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`.
|
||||
|
||||
To include this in your project, add to your build:
|
||||
<script src="https://gist.github.com/rspencer01/499a9e02185985bf3167f818d9c3398f.js"></script>
|
||||
|
||||
## layout\_width and layout\_height
|
||||
|
||||
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.
|
||||
|
@@ -29,6 +29,12 @@
|
||||
}
|
||||
|
||||
.gist {
|
||||
margin: 5px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.gistsample > .gist {
|
||||
width: 600px;
|
||||
margin: 50px;
|
||||
margin-left: 0px;
|
||||
|
Reference in New Issue
Block a user