Graphic margin & em – RC4

Just imported a template, and ran into a new issue with graphic margins on the Headline. Previously, it looks like the graphic margins referenced the element’s primary font size… but now may be pulling the font size directly from the graphic itself?

For example, below are screenshots of the same element on Pro 3 and RC4. The base font size is 1em, the graphic is 4em, and the graphic margin-bottom is 1em.

Pro 3
image

RC4
image

Inspecting them on the front end, it looks like the RC4 element is now passing along the font size from the graphic into the margin. (Pro 3 on left, RC4 on right)

image

Was this an intentional change to the margin behavior?

@devinelston, thanks for writing in. Yes, I did change this in this release…I had to introduce it to affect something else, but also after looking at the markup, I felt like either way ultimately this made more sense. Since the “Graphic” setup has it’s own base font-size control, I thought it was ultimately confusing to be able to set that to something like 50px and then add a margin of 1em expecting it to operate like 50px, but instead it would be inheriting from the main Text Element’s base font-size instead. Hopefully that makes sense, just felt like one of those quirks that needed to be adjusted to match people’s expectations more at a fundamental level. Depending on if you’ve used values other than 1em for the graphic and how big those adjustments are, you might have to go back and tweak some situations like this based on this change.

@devinelston, after looking at this again, I’m going to see if there’s a way to accomplish what I needed to do without having to move where this value was set. I can see how it feels like a “breaking” change even though it might make more sense. I will inform you here either way once I’m done looking into the matter.

Cool, thanks @kory – I also think the new behavior makes more sense, but agree that it definitely feels like a breaking change. But I guess that also depends on whether you’ve set values with em or px in prior builds… anyway :+1:

Hey @devinelston,

Just wanted to confirm here that we ended up reverting this :frowning: I wish we could keep it since the new implementation was more clear and operable from a new user perspective but we’re going to stay on the safe side of not changing things that would risk requiring people to go make these adjustments across all their sites.

3 Likes

Sounds like the right call

Thanks! All back to normal for RC5 (getting ready to bundle it up).