Files
yoga/docs/getting-started/standalone/index.html

29 lines
177 KiB
HTML
Raw Normal View History

<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><link rel="preload" href="/component---src-templates-without-playground-js-5215eaf3315c2548525f.js" as="script"/><link rel="preload" href="/path---getting-started-standalone-9d02e37e205173a8edc9.js" as="script"/><link rel="preload" href="/app-677a557ae5356ae5e499.js" as="script"/><link rel="preload" href="/commons-10bbb979a034c32358e3.js" as="script"/><title data-react-helmet="true"></title><style id="gatsby-inlined-css">@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Source+Code+Pro);@font-face{font-family:Monospaced Number;src:local("Tahoma");unicode-range:u+30-39}@font-face{font-family:Chinese Quote;src:local("PingFang SC"),local("SimSun");unicode-range:u+2018,u+2019,u+201c,u+201d}body,html{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@at-root{@-ms-viewport{width:device-width}}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:Monospaced Number,Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.5;color:rgba(0,0,0,.65);background-color:#fff}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-top:0;margin-bottom:1em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#6bcebb;background-color:transparent;text-decoration:none;outline:none;cursor:pointer;transition:color .3s;-webkit-text-decoration-skip:objects}a:focus{text-decoration:underline;text-decoration-skip:ink}a:hover{color:#95dbcb}a:active{color:#4fa899}a:active,a:hover{outline:0;text-decoration:none}a[disabled]{color:rgba(0,0,0,.25);cursor:not-allowed;pointer-events:none}code,kbd,pre,samp{font-family:Consolas,Menlo,Courier,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;color:rgba(0,0,0,.45);text-align:left;caption-side:bottom}th{text-align:inherit}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5em;font-size:1.5em;line-height:inhe
<p>Adding Yoga to a project is as simple as adding the dependency to your package manager of choice.</p>
<h3>Android</h3>
<div class="gatsby-highlight">
<pre class="language-groovy"><code>dependencies <span class="token punctuation">{</span>
compile <span class="token string">'com.facebook.yoga.android:yoga-layout:x.x.x'</span>
<span class="token punctuation">}</span>
</code></pre>
</div>
<h3>Javascript</h3>
<div class="gatsby-highlight">
<pre class="language-none"><code>$> yarn add yoga-layout</code></pre>
</div>
<h3>iOS</h3>
<div class="gatsby-highlight">
<pre class="language-none"><code>pod 'YogaKit', '~> 1.7'</code></pre>
</div>
<h2>Including Yoga From Source</h2>
<p>If you plan to include Yoga from Source in a C++ project then all you have to do is inlude
the top level <code>yoga</code> folder. Make sure to look at the top level <code>BUCK</code> file to ensure you build
using the same compiler flags.</p></div></div></div><a class="overview" href="/docs">BACK TO OVERVIEW</a></div></div><div class="Footer"><a href="https://code.facebook.com/projects/" class="logoOSS"><svg viewBox="0 0 1133.9 1133.9"><g><path d="M 498.3 3.7 c 153.6 88.9 307.3 177.7 461.1 266.2 c 7.6 4.4 10.3 9.1 10.3 17.8 c -0.3 179.1 -0.2 358.3 0 537.4 c 0 8.1 -2.4 12.8 -9.7 17.1 c -154.5 88.9 -308.8 178.1 -462.9 267.5 c -9 5.2 -15.5 5.3 -24.6 0.1 c -153.9 -89.2 -307.9 -178 -462.1 -266.8 C 3 838.8 0 833.9 0 825.1 c 0.3 -179.1 0.2 -358.3 0 -537.4 c 0 -8.6 2.6 -13.6 10.2 -18 C 164.4 180.9 318.4 92 472.4 3 C 477 -1.5 494.3 -0.7 498.3 3.7 Z M 48.8 555.3 c 0 79.9 0.2 159.9 -0.2 239.8 c -0.1 10 3 15.6 11.7 20.6 c 137.2 78.8 274.2 157.8 411 237.3 c 9.9 5.7 17 5.7 26.8 0.1 c 137.5 -79.8 275.2 -159.2 412.9 -238.5 c 7.4 -4.3 10.5 -8.9 10.5 -17.8 c -0.3 -160.2 -0.3 -320.5 0 -480.7 c 0 -8.8 -2.8 -13.6 -10.3 -18 C 772.1 218 633.1 137.8 494.2 57.4 c -6.5 -3.8 -11.5 -4.5 -18.5 -0.5 C 336.8 137.4 197.9 217.7 58.8 297.7 c -7.7 4.4 -10.2 9.2 -10.2 17.9 C 48.9 395.5 48.8 475.4 48.8 555.3 Z"></path><path d="M 184.4 555.9 c 0 -33.3 -1 -66.7 0.3 -100 c 1.9 -48 24.1 -86 64.7 -110.9 c 54.8 -33.6 110.7 -65.5 167 -96.6 c 45.7 -25.2 92.9 -24.7 138.6 1 c 54.4 30.6 108.7 61.5 162.2 93.7 c 44 26.5 67.3 66.8 68 118.4 c 0.9 63.2 0.9 126.5 0 189.7 c -0.7 50.6 -23.4 90.7 -66.6 116.9 c -55 33.4 -110.8 65.4 -167.1 96.5 c -43.4 24 -89 24.2 -132.3 0.5 c -57.5 -31.3 -114.2 -64 -170 -98.3 c -41 -25.1 -62.9 -63.7 -64.5 -112.2 C 183.5 621.9 184.3 588.9 184.4 555.9 Z M 232.9 556.3 c 0 29.5 0.5 59.1 -0.1 88.6 c -0.8 39.2 16.9 67.1 50.2 86.2 c 51.2 29.4 102.2 59.2 153.4 88.4 c 31.4 17.9 63.6 18.3 95 0.6 c 53.7 -30.3 107.1 -61.2 160.3 -92.5 c 29.7 -17.5 45 -44.5 45.3 -78.8 c 0.6 -61.7 0.5 -123.5 0 -185.2 c -0.3 -34.4 -15.3 -61.5 -44.9 -79 C 637.7 352.6 583 320.8 527.9 290 c -27.5 -15.4 -57.2 -16.1 -84.7 -0.7 c -56.9 31.6 -113.4 64 -169.1 97.6 c -26.4 15.9 -40.7 41.3 -41.1 72.9 C 232.6 491.9 232.9 524.1 232.9 556.3 Z"></path><path d="M 484.9 424.4 c 69.8 -2.8 133.2 57.8 132.6 132 C 617 630 558.5 688.7 484.9 689.1 c -75.1 0.4 -132.6 -63.6 -132.7 -132.7 C 352.1 485 413.4 421.5 484.9 424.4 Z M 401.3 556.7 c -3.4 37.2 30.5 83.6 83 84.1 c 46.6 0.4 84.8 -37.6 84.9 -84 c 0.1 -46.6 -37.2 -84.4 -84.2 -84.6 C 432.2 472.1 397.9 518.3 401.3 556.7 Z"></path></g></svg>Facebook Open Source</a><div class="SocialNetwork"><a href="https://github.com/facebook/yoga">GitHub</a><a href="https://twitter.com/yogalayout">Twitter</a></div></div></div></div></div><script id="webpack-manifest">/*<![CDATA[*/window.webpackManifest={"231608221292675":"app-677a557ae5356ae5e499.js","72572670756384":"component---src-templates-without-playground-js-5215eaf3315c2548525f.js","204390864267482":"component---src-templates-with-playground-js-22d23359e568cca8c3bc.js","162898551421021":"component---src-pages-404-js-6e11ee1eca3886916b83.js","278241087454979":"component---src-pages-docs-index-js-4d1e37ff1ffa5a1b030a.js","35783957827783":"component---src-pages-index-js-c03f55ec1db43825a5b7.js","254791781388126":"component---src-pages-playground-index-js-5c710cda2d683a6a8c8d.js","268116971626673":"path---contributing-testing-e651254efd99ce50eeb7.js","192663805765475":"path---contributing-writing-documentation-db7ce1c51c99b9a534df.js","212437926630407":"path---contributing-opening-a-pull-request-c2a892383041d57c6dc6.js","205164605393448":"path---docs-align-content-9950cd2484b26c0ebeec.js","76113469359673":"path---getting-started-standalone-9d02e37e205173a8edc9.js","210215793076373":"path---docs-absolute-relative-layout-148ef167481ca67535ad.js","182667197353205":"path---docs-flex-wrap-5e96cf2aaff49839e904.js","6107086138912":"path---docs-align-items-0b24d8d8638bd04a73d8.js","128646197259167":"path---docs-aspect-ratio-a042417cfec8df76d9cc.js","155446522250567":"path---docs-flex-direction-567fd5f961449baaa675.js","112416005357274":"path---docs-flex-fdaf506bb55b1c81c5a1.js","239964378814384":"path---docs-justify-content-4c49bd6499b421ed0e62.js","112498088019428":"path---docs-layout-direction-72885d75c2b4a679661b.js","
function gaOptout(){document.cookie=disableStr+'=true; expires=Thu, 31 Dec 2099 23:59:59 UTC;path=/',window[disableStr]=!0}var gaProperty='UA-44373548-24',disableStr='ga-disable-'+gaProperty;document.cookie.indexOf(disableStr+'=true')>-1&&(window[disableStr]=!0);
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44373548-24', 'auto');
ga('set', 'anonymizeIp', 1);</script><script>/*<![CDATA[*/!function(e,t,r){function n(){for(;d[0]&&"loaded"==d[0][f];)c=d.shift(),c[o]=!i.parentNode.insertBefore(c,i)}for(var s,a,c,d=[],i=e.scripts[0],o="onreadystatechange",f="readyState";s=r.shift();)a=e.createElement(t),"async"in i?(a.async=!1,e.head.appendChild(a)):i[f]?(d.push(a),a[o]=n):e.write("<"+t+' src="'+s+'" defer></'+t+">"),a.src=s}(document,"script",["/commons-10bbb979a034c32358e3.js","/app-677a557ae5356ae5e499.js","/path---getting-started-standalone-9d02e37e205173a8edc9.js","/component---src-templates-without-playground-js-5215eaf3315c2548525f.js"])/*]]>*/</script></body></html>