stretchable¶
stretchable is a layout library for Python that enables context-agnostic layout operations using CSS Block, 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 CSS Block, Flexbox and CSS Grid layout algorithms written in Rust. It was originally based on Stretch (hence the name), but has since migrated to use Taffy. It is multi-platform and there are distributions available for Windows, Linux and macOS.
Getting Started¶
stretchable is a Python package hosted on PyPI. It can be installed using pip:
$ python -m pip install stretchable
These next steps will help you get started:
Overview will introduce you to the basic concepts and show you a simple example of stretchable in action.
Learning CSS Layouts will help you understand the concepts of how you can use CSS to layout blocks of content.
stretchable by Example will give you a tour of the features and how to use them.
If at any point you get confused by some of the terminology, please check out the glossary.