Skip to content
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

figcaption positioning is wack #44

Closed
daveliepmann opened this issue Aug 14, 2015 · 10 comments
Closed

figcaption positioning is wack #44

daveliepmann opened this issue Aug 14, 2015 · 10 comments

Comments

@daveliepmann
Copy link
Contributor

Figure captions, inside figure tags, are not positioning properly under a variety of viewports.

@Zegnat
Copy link

Zegnat commented Aug 14, 2015

I think I am going to have a good look at this later tonight when my schedule clears up. It would be really great to get this solved, as we might be able to repurpose it for tables as well! (No more divs!)

When a table element is the only content in a figure element other than the figcaption, the caption element should be omitted in favor of the figcaption.

From 4.9.2 The caption element, HTML5 spec.

@daveliepmann
Copy link
Contributor Author

👍

@Zegnat
Copy link

Zegnat commented Aug 14, 2015

I have made a start at Zegnat/tufte-css, but it is extremely crude. Feel free to take a look and see if it sparks any ideas for you. It does somewhat support <720 pixels wide, but vertical margins are still off.

@daveliepmann
Copy link
Contributor Author

a72d0c3 addressed the immediate egregious errors that were evident on small screens. A more comprehensive solution is still desired.

@daveliepmann
Copy link
Contributor Author

It would also be of value for me to reread Tufte to take in some of his examples of figures. On a quick skim of The Visual Display of Quantitative Information, I notice many figures actually have no label, since they are introduced in the text. Figure captions in the margin seem restricted to citations that he doesn't introduce in the main body of the text. Sometimes these are aligned with the bottom of the figure, sometimes with the top, according to what is most pleasing to the eye. Again, more rigor and study is required.

@Zegnat
Copy link

Zegnat commented Aug 19, 2015

figcaption is not required inside figure from an HTML point of view, so optional labels shouldn’t really be a problem. A choice of aligning with top or bottom might be harder to work with in CSS…

@crmackay
Copy link
Contributor

you can have the figure caption above or below the image simply by placing the <figcaption> element ahead of the <img /> in the document, as opposed to after it. Here is code pen: http://codepen.io/crmackay/pen/yNdyXz?editors=110

@bolatovumar
Copy link

@daveliepmann could you post examples of this issue?

@daveliepmann
Copy link
Contributor Author

@bolatovumar The essential problem is that figcaption does not now and has never in the past successfully created captions that are aligned identically to sidenotes or margin notes. There's always been at least a tiny discrepancy on all viewports. I've removed uses of and references to figcaption because of this issue. If we can get them identical to marginalia then they'll be reintroduced, which I would like.

@RichardCore37
Copy link

Hi, I'm also having a problem with my figcaption displaying an unnecessary space above the text (or my image displaying an unnecessary space below the image. I've tried every fix that appears online - display block, vertical alignment, line heights, etc. but nothing seems to remove it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants