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

Add division tag around image tags #3549

Merged
merged 1 commit into from
May 11, 2020

Conversation

beutlich
Copy link
Member

@beutlich beutlich commented May 10, 2020

This PR improves the rendering of images in Dymola documentation view to avoid images being displayed next to the previous block.

img

@beutlich beutlich added L: ModelicaReference Issue addresses ModelicaReference documentation Issue addresses the documentation labels May 10, 2020
@beutlich beutlich added this to the MSL4.0.0 milestone May 10, 2020
@beutlich beutlich self-assigned this May 10, 2020
@beutlich beutlich force-pushed the improve-dymola-html-rendering branch from aa543b1 to e4aa9a8 Compare May 10, 2020 15:22
@maltelenz
Copy link
Contributor

Isn't this just a bug in Dymola? If I'm understanding correctly, blockquote is supposed to be display: block, which means there is already a line break, and the div is not needed.

Copy link
Contributor

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@beutlich beutlich merged commit eec2d50 into modelica:master May 11, 2020
@beutlich beutlich deleted the improve-dymola-html-rendering branch May 11, 2020 16:23
@henrikt-ma
Copy link
Contributor

Isn't this just a bug in Dymola? If I'm understanding correctly, blockquote is supposed to be display: block, which means there is already a line break, and the div is not needed.

I think this comment deserves a reply. I suppose standardizing on the WHATWG interpretation would be a possible choice for the Modelica documentation, but I don't see it stated anywhere. This means that W3C resources seem just as relevant, and at www.w3schools.com they just mention display:block as typical browser behavior:

Most browsers will display the <blockquote> element with the following default values: …

Anyway, regardless which HTML specification we have in mind, I think wrapping these images in <div> looks like good style, expressing clearly that these images should have line breaks both before and after.

@maltelenz
Copy link
Contributor

After some more reading, it turns out that the img tag, being an inline element, can not occur directly in the body element, since body only accepts block elements. As such, I see why it makes sense to wrap a div around img tags.

This means that W3C resources seem just as relevant, and at www.w3schools.com ...

w3schools.com is not affiliated with W3C, and as such is not a authoritative source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issue addresses the documentation L: ModelicaReference Issue addresses ModelicaReference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants