Sep 19, 2024
Adding styling to my notebook UI.
Some black text on a white background. Text within square brackets separated by a pipe character is rendered in two lines, with the text after the pipe in the lower line colored a subtle grey. I can click around anywhere, insert text, delete text.
After that initial orientation, I surround a word 'heat' in angle brackets, and then add some styling after a pipe character. fg=1,0,0. Now the word 'heat' renders in red, and the styling shows in a line below it colored a subtle grey. All this remains editable at all times.
Now I go to the top of the screen, hit enter a couple of times to get to an empty line. Then I type in '---' and then fg=0,0,1. Now all the black text turns blue. I delete the style and try out a new one: bg=0.8,0.6,1. Now the whole screen has an orange background.
I move the cursor halfway down the screen, create a new empty line and type in 3 dashes and then 'bg= 0,0.6,1' Now this line and everything below has a green background. 3 dashes denotes a new section, and sections can be styled independently.
It looks like I care about always making the styling very transparent, so it's possible in principle to guess what characters one needs to type to copy the look of something one sees on screen. So the style directives will never be hidden.
This post is part of my Freewheeling Apps Devlog .
Comments gratefully appreciated. Please send them to me
by any method of your choice and I'll include them
here.