Colosseum is an independent implementation of the CSS layout algorithm. This implementation is completely standalone - it isn’t dependent on a browser, and can be run over any box-like set of objects that need to be laid out on a page (either physical or virtual).

It takes a tree of content "nodes", such as a DOM from a HTML document, and applies CSS styling instructions to layout those nodes as boxes on the screen. In the case of Toga, instead of laying out <div> and <span> elements, you lay out Box and Button objects. This allows you to specify incredibly complex, adaptive layouts for Toga applications.

But Colosseum as a project has many other possible uses. It could be used anywhere that there is a need for describing layout outside a browser context. For example, Colosseum could be the cornerstone of a HTML to PDF renderer that doesn't require the involvement of a browser. It could also be used as a test harness and reference implementation for the CSS specification itself, providing a lightweight way to encode and test proposed changes to the specification.

The current implementation was originally based on the Yoga project, open-sourced by Facebook.

For more information about Colosseum, check out this blog post describing the project and talking about it's roadmap.

Dlaczego więc nazywa się to "Colosseum"?

The Colosseum, also known as the Flavian Amphitheater, is an ancient Roman Amphitheater in the center of Rome. It is an astounding piece of ancient architecture, noted for its three layers of arches, framed by Doric, Ionic and Corinthian half-columns, with an attic decorate with Corinthian pilasters.

Much like Doric, Ionic and Corithian columns form the fundamental architecture of the ancient Roman world, CSS is part of the fundamental architecture of modern display computing. The regular repeating structure of the Colosseum’s arches and columns mirror the regular grid-based layout of many modern web and print designs.

The Colosseum was also a massive undertaking for its time. Undertaking to reproduce the entire CSS specification, with all its quirks and eccentricities, is a similarly massive undertaking.

But most importantly: C-olo-SS-eum.


Kod źródłowy

Dokumentacja


Typ projektu:
Biblioteka
Stan:
Wczesny rozwój
Język:
Python
Platforma:
Niezależny od platformy

Twórcy