Formal CSS block positioning semantics

I am a (theoretical) student in computer science, and therefore the study of the semantics of programming languages ​​is one of the subjects of my research ( wikipedia ).

I played a lot with CSS and am well versed in box positioning rules. (If you tell me to create a page with a specific layout, I can often think of the right field approach and the applicable CSS rules.)

It would be great to have some kind of formal semantics for CSS block positioning rules, but after some searching on the net I could not find anything useful.

I basically just end up with CSS specs that are formatted as long texts with pseudo-algorithms (not the biggest read value --- I haven't read any of these specs yet with a lot of effort).

Has no one tried to formalize this "theory" into some kind of mathematical model, more rigorous than those that can offer specifications? I am not looking for something complete or final, but it would be neat (and useful!), If at least the way the boxes were placed could be modeled formally.

Does anyone know about such studies?

+5
source share
1 answer

Not an answer! This is an example of a possible formalization of a very simplified case (see my comment above).

, , (1) enter image description here, (2) enter image description here enter image description here, , /padding/limits, float left (2.1) (2.2) w h.

enter image description here enter image description here, .

/ "enter image description here enter image description here", "enter image description here enter image description here".

, enter image description here 0.

, enter image description here l, , , m in N

enter image description here

... , :

  • box heights in certain line
  • box widths in certain line
  • l lineheight
  • bm + 1 l +1 iff m le N

. , , , , ( ), ( , ).

, (. wikipedia).

, - - CSS. , , , .

+2

All Articles