From 17be6718eee7b5185146c7763dc1a371a0e6c693 Mon Sep 17 00:00:00 2001 From: Robert Spencer Date: Tue, 7 Mar 2017 05:16:06 -0800 Subject: [PATCH] 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 --- docs/_docs/api/android.md | 7 ++++++- docs/_sass/_yoga.scss | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/_docs/api/android.md b/docs/_docs/api/android.md index d2a7340d..1f46ab1f 100644 --- a/docs/_docs/api/android.md +++ b/docs/_docs/api/android.md @@ -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: + +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 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: + + ## 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. diff --git a/docs/_sass/_yoga.scss b/docs/_sass/_yoga.scss index 3f5acc7b..fc40b77a 100644 --- a/docs/_sass/_yoga.scss +++ b/docs/_sass/_yoga.scss @@ -29,6 +29,12 @@ } .gist { + margin: 5px; + margin-left: 0px; + margin-right: 0px; +} + +.gistsample > .gist { width: 600px; margin: 50px; margin-left: 0px;