Hey, I’m Darren. I’m a software engineer from Scotland who enjoys working on open source projects. I specialise in Python and writing developer tools which run in the terminal. My most well known projects are Posting, a modern HTTP client which runs in the terminal, and Elia, a TUI for interacting with local and proprietary LLMs. This site is a collection of tips, tutorials, random thoughts, and anything else I feel like writing about!

Let's get fractional! Textual layouts with fr units


Fractional units (fr) are a tool in Textual’s CSS system which lets you distribute space between child widgets inside a container in a really intuitive way.

I use them everywhere in my Textual apps, but I get the feeling that they may be a little under-appreciated.

fr units make it easy to implement many common layout patterns, and have some less obvious benefits too!

Let’s explore how fractional units work in Textual, along with some practical examples!

Read more ⟶