blitz icon indicating copy to clipboard operation
blitz copied to clipboard

Add a screenshot of a basic website

Open skyfallwastaken opened this issue 2 years ago • 10 comments

It would be nice to see the progress of blitz by showing it render a basic website (perhaps one of the websites on nocss.club?)

skyfallwastaken avatar Feb 18 '23 20:02 skyfallwastaken

Having a few real world example demos built up to show what you can build with Blitz and screenshots of them in the readme would be a great addition!

It could also be interested to have a "goal app" implemented in Dioxus web or desktop (hacker news?) for Blitz to work towards

ealmloff avatar Feb 20 '23 00:02 ealmloff

Unfortunately Blitz currently (or soon) implements what are considered "advanced" layout modes from the perspective of the web (Flexbox and CSS Grid) but not the "basic" ones (block/inline and table layout). And I'm also not sure what state Blitz' text rendering is in. So it might be difficult to find websites that it can render well.

I looked at Hacker News as Taffy demo. But unfortunately it uses table layout, which might make it tricky. The tables spec is... not small https://www.w3.org/TR/css-tables-3/. It would definitely be possible to recreate though. And perhaps that might be a worthwhile excercise?

nicoburns avatar Feb 23 '23 12:02 nicoburns

I would suggest the following as the minimum viable feature set for rendering a website:

  • [x] display: block (https://github.com/DioxusLabs/taffy/issues/405)
  • [x] Multiline text (some minimal display: inline subset)
  • [x] Minimal scrolling support (at least of the top-level viewport)

Then as part of the demo itself we'd ideally want:

  • [x] Fetch webpage via URL
  • [x] Parse HTML and inline CSS
  • [x] Implement a subset of the browser default stylesheet (e.g. https://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css) as part of the demo.

Extension tasks:

  • [x] Images (https://github.com/DioxusLabs/blitz/pull/24) and fetching images via URL
  • [x] Actual CSS selector resolution (presumably using the selectors crate)
  • [ ] Font resolution (installed fonts and web fonts)
  • [ ] Click handling for links

Normalize.css (https://necolas.github.io/normalize.css/8.0.1/normalize.css) would also be a sensible target to track. Also https://css.tobyase.de

nicoburns avatar Mar 28 '23 11:03 nicoburns

Sciter's CSS support might also be a useful point of comparison:

  • https://sciter.com/developers/for-web-programmers/
  • Full property list https://sciter.com/docs/content/css/cssmap.html
  • Proprietary morphorm-like layout https://sciter.com/docs/flex-flow/flex-layout.htm

nicoburns avatar May 01 '23 23:05 nicoburns

I've started working on Block layout in Taffy here: https://github.com/DioxusLabs/taffy/pull/474.

nicoburns avatar May 01 '23 23:05 nicoburns

https://alistapart.com/ could be a possible target to aim for. It would require the ability to resolve CSS selectors / stylesheets and will exercise quite a few layout/styling paths, but it works well without JS.

nicoburns avatar May 14 '23 23:05 nicoburns

https://alistapart.com/ definitely has some issues, but it is also very much recognisable...

Screenshot 2024-06-14 at 09 47 05 Screenshot 2024-06-14 at 09 47 18

nicoburns avatar Jun 13 '24 21:06 nicoburns

Blitz rendering it's own README:

Screenshot 2024-06-12 at 16 16 06

nicoburns avatar Jun 19 '24 23:06 nicoburns

https://servo.org

Screenshot 2024-06-12 at 11 28 55

nicoburns avatar Jun 19 '24 23:06 nicoburns

Screenshot 2024-07-30 at 16 31 15

nicoburns avatar Jul 30 '24 04:07 nicoburns