Coder Social home page Coder Social logo

acton393 / yoga Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebook/yoga

0.0 1.0 0.0 33.04 MB

Yoga is a cross-platform layout engine which implements Flexbox. Follow https://twitter.com/yogalayout for updates.

Home Page: https://yogalayout.com/

License: MIT License

C 0.23% Java 21.65% Python 0.21% C++ 31.96% Shell 0.10% JavaScript 20.52% HTML 1.63% C# 21.42% Objective-C 1.26% Ruby 0.11% Batchfile 0.02% Swift 0.30% CMake 0.18% CSS 0.40%

yoga's Introduction

Yoga Support Ukraine CocoaPods npm Maven Central

Yoga is an embeddable and performant flexbox layout engine with bindings for multiple languages.

Building

Yoga's main implementation targets C++ 14 with accompanying build logic in CMake. A wrapper is provided to build the main library and run unit tests.

./unit_tests <Debug|Release>

While not required, this script will use ninja if it is installed for faster builds.

Yoga is additionally part of the vcpkg collection of ports maintained by Microsoft and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Adding Tests

Many of Yoga's tests are automatically generated, using HTML fixtures describing node structure. These are rendered in Chrome to generate an expected layout result for the tree. New fixtures can be added to gentest/fixtures.

<div id="my_test" style="width: 100px; height: 100px; align-items: center;">
  <div style="width: 50px; height: 50px;"></div>
</div>

To generate new tests from added fixtures:

  1. Run bundle install in the gentest directory to install dependencies of the test generator.
  2. Run ruby gentest.rb in the gentest directory.

Debugging

Yoga provides a VSCode "launch.json" configuration which allows debugging unit tests. Simply add your breakpoints, and run "Debug C++ Unit tests (lldb)" (or "Debug C++ Unit tests (vsdbg)" on Windows).

yoga's People

Contributors

vjeux avatar davidaurelio avatar sidharthguglani-zz avatar priteshrnandgaonkar avatar woehrl01 avatar splhack avatar passy avatar d16r avatar colineberhardt avatar nickgerleman avatar danielbuechele avatar lucasr avatar amir-shalem avatar prenaux avatar swolchok avatar daviskoh avatar astreet avatar ttsugriy avatar emilsjolander avatar rmarinho avatar hartbit avatar frantic avatar devongovett avatar shergin avatar javache avatar zertosh avatar mdvacca avatar joelmarcey avatar arcanis avatar mzlee avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.