kristopolous / BOOTSTRA.386

A vintage 1980s DOS inspired Twitter Bootstrap theme

Home Page:https://bootstra386.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bs4: alignment engine

kristopolous opened this issue · comments

I have this sick fantasy that there may be a way to coerce horizontal and or vertical character alignment to mock the character displays of cga/ega without:

  • using javascript
  • requiring any extra html
  • limiting the viewport to say "x" number of characters. The user resizes the window and the document flows naturally across while at the same time maintaining pixel alignment

Before (v2/v3) I did this very painfully by taking screenshots, doing careful calculations, comparing the rendering engines of the different browsers, using guide lines and even at one point using a usb microscope to check actual pixels.

That was all fun and games but in the brave new world of perverted hacks I've gotten the batshit idea that the modern css systems can handle this. this thread will be my exploration.

Also and perhaps most importantly this will allow me to solve the centering problem ... once there's an odd number of characters things break. Again, yes, javascript, got it, totally possible ... don't want to use it, this project isn't about being practical, it's about pornographic programming

my most recent attempt was to use the <col>'s align="char" feature which has been deprecated for a while now. Here it is in HTML 4.01 (https://www.w3.org/TR/html401/struct/tables.html#adef-charoff). As an interesting thing, this leads to a strange underused version of CSS's text align:

align: [ col alignment character ] center

I can't find this in any w3 spec but mdn has it in their wiki: https://developer.mozilla.org/en-US/docs/Web/CSS/text-align

Now this is all good, maybe we have some perverse way of doing this ... however, if you take the example out of the HTML spec and put it into a modern browser you'll see it totally and completely ignores it. It's not only deprecated but it's also apparently unimplemented. So this is a no-go

an earlier model was trying to use the w3c's rhythmic sizing feature of line-height-step which looks like it can perhaps maybe I dunno, get vertical alignment to be guaranteed? I don't know how ... but it does do the stepwise thing that I need

https://drafts.csswg.org/css-rhythm/#line-height-step

Cool!