Starlight is a layout engine for cross-platform framework (e.g. React Native)
Support all standard flex properties! Completely the same as CSS Flexible Box Layout Standards.
For testing we rely on gtest as a submodule. For any changes you make, you should ensure that all the tests are passing. In case you make any fixes or additions to the library please also add tests for that change to ensure we don't break anything in the future. Tests are located in the layout_test
directory. You can run test under the following direction.
Instead of manually writing a test which ensures parity with web implementations of Flexbox you can run layout_test/gentest.rb
to generate a test for you. You can write html which you want to verify in Starlight, in layout_test/feature
folder, such as the following.
<div id="my_test" style="width: 100px; height: 100px; align-items: center;">
<div style="width: 50px; height: 50px;"></div>
</div>
-
install Ruby,cmake
-
install WebDriver
$ sudo gem install watir $ sudo gem install watir-webdriver
-
update chromedriver and add to PATH
$ cd ./layout_test/ $ ./updatechromedriver.sh # works under mac-os, otherwise please check the version and update manually $ export PATH="$PATH:`pwd`/Tools"
-
use Ruby to generate test files
$ ruby ./gentest.rb
-
compile and execute
-
on Mac: use bash script
layout_test/test-mac.sh
or seperate commands$ mkdir build $ cd build $ cmake .. -G "Xcode" $ xcodebuild $ ./bin/Debug/layout_test
-
on Linux: use bash script
layout_test/test-linux.sh
or seperate commands$ mkdir build $ cd build $ cmake .. $ make $ ./bin/layout_test
-
-
Please use the correct
Tools/chromedriver
corresponding to your chrome version. If your chrome version > 75, usegoog:loggingPrefs
ingentest.rb
.caps = Selenium::WebDriver::Remote::Capabilities.chrome( "goog:loggingPrefs"=>{ "browser"=>"ALL", "performance"=>"ALL" } )
Otherwise, use
loggingPrefs
.caps = Selenium::WebDriver::Remote::Capabilities.chrome( "loggingPrefs"=>{ "browser"=>"ALL", "performance"=>"ALL" } )
- support absolute elements
- optimize LayoutModeAtMost
- add measure function support