Quote:
Originally Posted by kovidgoyal
Pretty obviously whether something fits on a given page depends on the size of the page. The sizes of the pages are different in the two cases.
|
I always thought whether something fits on a given page depends on an algorithm implemented in the document's handler created by the IT specialist(s).
As mentioned above, several Chromium Project members confirmed "break-inside" is a buggy property, it has to work as it supposed to but doesn't and it is not advisory property (at least I didn’t find any reference to it as to an advisory property, all mentioned Chromium Project members consent that it has to avoid breaking but due to bugs in implementation it doesn't).
If in the code was strictly specified that it has to avoid breaking inside a block of content algorithm must process it so to prevent any disruption. How it should be handled - all depends on how sophisticated this algorithm is.
If the algorithm is rather simple it'll shift responsibility to the base handler of the browser at the same time more complex algorithm will try to process content by itself first of all using common sense and looking at CSS's properties. What common sense implies - the main goal is to comply to author's directives in the code and to give an opportunity to user to grasp the information in the content, i.e. ability to view image(s) and text:
Processing block with break-inside:avoid (bear in mind this property almost always inserted consciously) depending on what the block's content consists of:
1. only text
2. text+image(s)
3. only image(s)
->
1. only text:
- if it couldn't be fitted because the volume of text is too big but due to the author of the HTML code defined that this block has to avoid breaking -> Ok, whatever let's fit it on one page by resizing font since the author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it;
- if it could be fitted on one page -> Ok, let it be so.
2. text+image(s):
- if the image(s) is(are) too big to fit whole block on one page -> let's look at CSS ->
- img has height:auto property or there are no properties concerning its size -> resize image(s) to bare visible minimum size(e.g. min-height: 10%) -> if it couldn't be fitted even now -> Ok, whatever let's fit it on one page by in addtion resizing font size since author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it;
- img has strictly defined size (thus the author implied the img is more important then text) -> let's look at text's CSS, if it hasn't any limitations in font properties -> resize text to bare readable minimum size(e.g. 6px) -> if it couldn't be fitted even now -> Ok, whatever let's fit it on one page by resizing font since author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it;
- if the image(s) + text could be fitted on one page -> Do it, just do it!
3. only image(s):
- if the image(s) is(are) too big to fit whole block on one page -> Ok, whatever let's fit it on one page by resizing image(s) since author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it;
- if the image(s) could be fitted on one page -> Ok, accommodate it.