Math model for a webpage layout? [closed]

While web-programmers surely know CSS/HTML rules by heart, and web-browsers have algorithms to render web-pages, what interests me whether there are any mathematical/theoretical models or at least formal specification languages for web-page layout (“physics”, “geometry”) allowing to generate bullet-proof html/css given concise specification.

For example, I would like to specify a responsive layout with nested elements (blocks), which behaves in a certain way, say, some stay relative, some flow, some keep height, some keep width, etc. All of this is expressible in CSS/HTML, but the rules are sometimes weird (like having parent/child being absolute/relative to achieve certain effect, e.g. the one here http://css-tricks.com/absolute-positioning-inside-relative-positioning/, which required ah-ha moment).

Also, I think that HTML/CSS is somewhat too verbose and often ambiguous in specifying exact intentions, that makes nearly impossible to “program” web-page and be sure of the result. And even rendering a couple of examples is not enough, because there may occur some unforeseen combination of lengths of texts, which will break the layout.

Somehow I strongly believe, that those relations of nested blocks and elements can be described in a more formal and brief way, with some tool turning the description into HTML/CSS (I am speaking of structural, geometrical relations only, no hope for inline placements). However, so far I have not found any language or manual, which would suggest there is any comprehensible system in how CSS/HTML works. (No doubt though that with demise of IE6 situation improved somewhat).

How to define “physics” / “geometry” of HTML pages to the point where simple set of formulas and constraints can model the resulting web-page?

If the above is still vague, here is a sketch of what I mean by formal spec. Say, I have 4 blocks (A, B, C, D) and I want A, (B and C), D vertically aligned, while B and C side by side and float (other details may be “by default”), so I can write something like:

A / (B, C) / D

And some tool can generate HTML/CSS doing exactly that, under any situations and screen sizes.

Even though it seems like a piece of cake, proven frameworks (like Bootstrap) are needed to be more confident in the result.

Of course, html/css -> that hypothetical modelling language would be a big bonus.

For some analogy – Auckland layout model: http://www.crt.umontreal.ca/~pesant/Constraints/Papers/LutterothSW08.pdf

I would like to point out that I am more interested in an underlying concept, algorithmic approach, rather than specific tool (even though tools are usually made to demonstrate a concept).

8

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật