Target-agnostic cross-platform layout library based on Taffy
Project description
Introduction
This package enables target-agnostic layout operations using CSS Grid and Flexbox. Possible uses include UI layouts, page layouts for reports, complex plotting layouts, etc.
It implements Python bindings for Taffy, an implementation of Grid/Flexbox written in Rust. It was originally based on Stretch (hence the name), but has since migrated to use Taffy.
Getting Started
Helpful resources to getting started with layouts using CSS Grid and Flexbox are listed below.
Flexbox
- Flexbox Froggy. This is an interactive tutorial/game that allows you to learn the essential parts of Flexbox in a fun engaging way.
- A Complete Guide To Flexbox by CSS Tricks. This is detailed guide with illustrations and comphrehensive written explanation of the different Flexbox properties and how they work.
- Yoga Playground
CSS Grid
- CSS Grid Garden. This is an interactive tutorial/game that allows you to learn the essential parts of CSS Grid in a fun engaging way.
- A Complete Guide To CSS Grid by CSS Tricks. This is detailed guide with illustrations and comphrehensive written explanation of the different CSS Grid properties and how they work.
Usage
See demos for examples of basic usage. Keep in mind that the current version of Stretchable is early stage and the API can be expected to change (eg. improve).
Building
Install Rust with rustup and use maturin develop
for development and maturin build [--release]
to build.
Testing
Install test dependencies and invoke pytest
. Note that there are more than 700 tests, the majority of which are run using Selenium with the Chrome WebDriver, and the complete test suite can take 10+ minutes to complete. Use pytest --lf
to only run the last-failed tests.
License
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for stretchable-1.0.0b1-cp37-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd01bbc5328e8981441d4c21e2e1bb32db1d83906951479b96c6baa31947f26 |
|
MD5 | a0b3ed79430d33568fb16c3b0fb212f6 |
|
BLAKE2b-256 | 4902cf5889b7a0883ae4fb5617362e54fa7789a706b2162003e5e7ef97d910c8 |
Hashes for stretchable-1.0.0b1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66f5fdae4bf4c0021f52d2205b199e763579de9165f30353cfc9b815ee458502 |
|
MD5 | 51f1b7a20958fdfa20d106389bd08035 |
|
BLAKE2b-256 | 73ddd3c347ccf64dad50b9482d7afcda66dfea99713420517dc626d23d4f10a6 |
Hashes for stretchable-1.0.0b1-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e547b6a4a51dbddbd1a4cdda1787d1f8b65a842c200ef1381b7da55347a8cce6 |
|
MD5 | d6ad0658af9d5ee89b2041bfd1719b4f |
|
BLAKE2b-256 | f6518aa2f817802cca893e658cc0d076365b96f697f77f41a3d6023b643179b8 |
Hashes for stretchable-1.0.0b1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ed4fdee19b08395708792deb6e616e4308cd173fb18a8c41bd74c10a5c31a06 |
|
MD5 | 9698c2c656ea7148eed2983e4f0987cc |
|
BLAKE2b-256 | ddcfbb3eac6a689ccd42ad24b8e7dcc3e0c9d749194a8117b5328615e103d09d |
Hashes for stretchable-1.0.0b1-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ee91ab394e7b2f4c1c38b663782e32e9654f7dcc5dbe35d55865a2e94af4e4c |
|
MD5 | 725d4d7d682b1b7f378dfc5a3379f6d7 |
|
BLAKE2b-256 | 949a83aa3f46c856a7fa4d155473619a80bd32c75899e77a534d545340566c02 |
Hashes for stretchable-1.0.0b1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 997fce40370a872804694522ff67c5a3c74ee5a9c899a3871f630226c1f501bc |
|
MD5 | f43de5d7ce76c250c48aa7ea5b504590 |
|
BLAKE2b-256 | 4f7208251a516601996b9e55a4e2b1f70862a76823aa6fc5c3a185affdf029b3 |
Hashes for stretchable-1.0.0b1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d55e9333496abddc9862a26dc33457452c9992dc4e1a5bbf5e3f8c05b6730a71 |
|
MD5 | 83bf8635311375427b73800cf1ab8c75 |
|
BLAKE2b-256 | bda8441079d43dea0032ff5b56fd4c84987e637033112e54ef519a12fa6cf1b3 |
Hashes for stretchable-1.0.0b1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2e070c3a1101cbeac3f6035dfc8a42c89c08ac1c4ca19e2bf9fe041d959f3b0 |
|
MD5 | 703eb4e4c6933ae606341d89a7dbdd4c |
|
BLAKE2b-256 | baa899f4720053fe18d71e30bfc0255b93c464737fdc43f00283b70d70670b15 |
Hashes for stretchable-1.0.0b1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac1a90f31b6e5b02842d5989d92832d195b00ef5ce5016f301ae4a0c9e541561 |
|
MD5 | b1b5d99a2fff5cd2a680ca8ab13fe137 |
|
BLAKE2b-256 | 660e5aebea2329b967df74c1289c3f19f6be56b6c70e58b0b6b398794c4c5f13 |