Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added max-width and changed figure to image#1982

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 1 commit intosymfony:2.0fromwouterj:figure_to_image
Dec 18, 2012

Conversation

wouterj
Copy link
Member

We should use the.. image:: directive as the figure is for images with captions and we should add a max-width of690px so the images don't breakout of the content section.

@weaverryan
Copy link
Member

Hey!

I remember a LONG time ago trying to decide between usingfigure andimage for this very reason. The disadvantage ofimage, is that animage can't have any "text" beneath it. Specifically, withfigure, the indented text beneath it becomes the "caption" under the image. The caption at symfony.com isn't particularly well formatted, but that's the idea (you can see in the image below how it looks with the default sphinx theme).

I'm not sure either how this might end up looking when we render it in the PDF - it might have no effect at all, I just don't know! What do you think about making the image itself a bit smaller?

foo.

@wouterj
Copy link
MemberAuthor

Oh, wow, I really missed that caption. They should be styled better in the documentation. Now it looks like the caption is just the normal content, which leads to mixed semantics and a less readable docs. It looks the same (no style) inside the PDF. A simple margin like.figure .caption{ margin: 0 20px; } makes a great difference.

It seems that images are scaled down automatic in PDF (see image below). Scaling down the images themselves is a lot better, if it is done with the right tool. It will decrease page load time (a little bit) and it solves the confusing how it works in the PDF.

It is maybe an idea to put something like this inside the symfony.com stylesheet, to make sure images aren't wider than the content:

.box_article img{    max-width:100%;}

pdf images

@weaverryan
Copy link
Member

@wouterj +1 for making the image just a little bit smaller to fit on the page naturally, at its full width Do you want to do that? And about the CSS, can you open another issue on that - then I'll tag it withwebsite so that Fabien knows to look for it.

Thanks!

@wouterj
Copy link
MemberAuthor

@weaverryan I will create a new issue for the CSS and when I get some better image editor than Paint, I will resize the image.

@wouterj
Copy link
MemberAuthor

@weaverryan I have created an issue (#2034) and updated this PR to only resize the image, it should be ready to merge now.

weaverryan added a commit that referenced this pull requestDec 18, 2012
Added max-width and changed figure to image
@weaverryanweaverryan merged commit46100f6 intosymfony:2.0Dec 18, 2012
@weaverryan
Copy link
Member

Awesome all around! The captions look much much better now on the site (... needs a force-refresh to see them)

@wouterjwouterj deleted the figure_to_image branchDecember 31, 2012 14:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@wouterj@weaverryan

[8]ページ先頭

©2009-2025 Movatter.jp