New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for "bleeds" on wide content? #27
Comments
Issue #24 would indeed help with this situation, by preventing wastage of potential expansion space on the left of the main text block. However, I didn't mention in issue #24 that large diagrams and tables should be allowed to move past the main text column and expand as the width of the window expands, because I thought that was already agreed, but we should check that that is actually the case. My expectation was that any figure or table would be free to grow past the edge of the main text block to the right. Whether or not the item needs to be in a container with a special class name, i'm not sure (since some examples, especially rtl text, may look neater if constrained to the width of the main text block). Here is also a case where it would be good to allow the user to switch off/on the display of the TOC on the left of the page since, given that at a certain width the expansion space is suddenly swallowed up again by the TOC, you really have to make the window much wider to see large tables and diagrams. (I'm a little concerned that we only have one demo document for the styling and that it is limited in the range of features it includes (eg. no wide diagrams and tables). I'll raise a separate issue about that.) By the way, Ivan, it may help (even in the current style) to set the width of the large diagram to something more than 75%. (It may also help to reduce the font-size slightly for the large table in the new style.) |
|
There's not much I can do in CSS atm that will allow content to make use of space outside max-width unless it genuinely can't fit inside. If it doesn't fit, it will of course spill out. Note however, this means it is unlikely to fit on an A4 sheet when printed, either!!!! Printing aside (which I can't help), I can add a class that will size an element to the width of the viewport. This can be used to make the element that size (which may be too big, e.g. for a table that's only needs half the size of the viewport, it will still be stretched to the size of the viewport). Or it can be used to create a container for such overlarge content, in which case the content will just see that it has a viewport-sized space available to it and use as much of that space as it needs. However in this case you won't be able to do very sensible centering, since it'll center in that viewport-sized container and not align to the rest of the text column, even if it could. (Either way it's kindof awkward.) Btw, since content can spill out if it doesn't fit, then you can prevent a table from squashing by adding "@media not print { table { white-space: nowrap; } }". There's a wide table in the index section, fwiw. :) But I'm happy to add more content to the sample document. In fact, if you want to add a PR to add more chapters similar to "Sample CSS Section", please go ahead. I only haven't done it because I haven't gotten around copying bits of other specs in myself. |
@fantasai, I have tried the For the use case I had in mind we will probably bypass the issue because we will try to publish the Rec this year. For documents which have more leeway for editorial changes (which is not the case for a Proposed Rec transition to Rec) they can be adapted indeed. Two minor comments:
|
[bring this up here, because there's no indication that https://github.com//issues/24 has been noticed] During TPAC we agreed that there would be a fixed distance margin on the right of the main text block, and that if the window size was increased horizontally the max-width would therefore produce a variable and potentially much larger margin to the right, so as to better accommodate wide tables, diagrams, etc. Please implement this. Thanks. |
…o match the viewport width rather than the max-width.
Okay, I've adjusted the default max-width on figures to be the viewport size rather than 100% of the body text block, and added a .overlarge class for when you want to assign the viewport width to a particular element. Let me know if that seems good, or if you have other ideas for this problem. |
That sounds good; will you add an example into the doc on how that should be used? I would prefer you did it rather than I (or anybody else) trying to reproduce what is necessary… Thanks |
Ah, I checked that in, but forgot to upload it to my website. http://fantasai.inkedblade.net/style/design/w3c-restyle/2016/sample#overlarge |
Thank you!
|
i'm inclined to think, after some playing around, that it would be nicer if figures with .overlarge set had |
I think this is indeed a bit better; I guess people will try to avoid the usage of .overlarge, except for larger items, and in those cases every inch (well, every px:-) counts. Ie, to push the image to the left for latin based texts (I guess that is what 'start' means) is indeed sensible. For the positioning of the caption: the only issue is that it should be consistent with all other figures. Ie, if it is centralized elsewhere, it should be the same for this case. Is that a major issue? Ivan |
here's the problem with captions. Imagine you have a figure containing an image and a caption. Imagine also that your window is 100em wide (about twice the width of the main text column), and that the image is 75em wide. If the caption is centred on the figure width, it will be too far to the right to look correctly positioned relative to the image. I don't know how to position it within the space actually taken by the image (ie. within the 75em width). |
Ah! Yep, indeed, this is a problem:-( Unless we decide to align the caption by 'start' in general, but that may be ugly. Sigh:-(, I do not have a solution... |
Actually, what seems to work better for a figure containing a wide graphic and a caption is to not use Perhaps .overlarge is best used just for very wide tables, without captions. But i still suspect that |
This may be related to issue #24, but I am not entirely sure that one fully cover it.
The new design has restricted the default width of the text significantly. This creates issues with documents that were prepared under the old style; their transition to the new style may become fairly difficult and time consuming. The difficulty comes with content like large tables or diagrams that try to make use of the full width of a window and which cannot simply be shrunk without loosing readability. Just two examples, both from an upcoming Rec related to CSV on the Web (typically on data table, thus...):
I have made some local experimentation with these by simply exchanging the style file reference, and the result are fairly bad. The way I see it the only viable approach today would require a significant editorial re-engineering to make the examples and/or the diagrams usable. (This is a real drag at this stage of the process.) I am not sure whether there is a way to alleviate this. (E.g., is it possible to allow some 'bleed' of these content into the wide margin on the right? Not nice, but may be necessary... Or switch "off" the large margins for the document through a specific class.)
Cc: @plehegar @r12a @gkellogg @JeniT @6a6d74
The text was updated successfully, but these errors were encountered: