-
Notifications
You must be signed in to change notification settings - Fork 58
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
Remove extra inner padding on text blocks #992
Comments
Removed the 1.5 milestone, let's only use milestones for PRs |
Sounds good, apologies! |
On Android, I did a quick sanity check - loaded the a test post with the block editor in the Layout inspector. Then I took a screenshot with Material Grid and added the layout inspector over it. Here is the result of this: From this screen shot:
I think that removing the padding on text area would fix this problem on Android. I'll investigate more to check where this is coming from (RichText component? Aztec? glue code?). |
There might be some related changes in #1379, or at least I was discussing block margins there yesterday |
By setting adding But for some reason when using bigger font in a RichText (see the heading block in this screen shot) there is some extra vertical white space which is not a padding. See here: Note: I also checked the |
Interesting notes above. @maxme. Do you know what the line-heights are set to for headings? I wonder if that has something to do with the additional optical spacing. For example, here's what the measurements of a Heading 2 block look like (22px font-size 28px line-height: For reference, here is the type scale I'm following (
If we need to, we can define a standard formula/ratio and stick to it. FWIW, I propsed a refinment to the base (paragraph) alignment, but the headings need to be a little bit tighter, so they could be set to something between to 1.2 or 1.4. IIRC, there is also a difference in how Android and iOS handle line-height equivalents, so I wonder if we might need to define this differently for each platform. Inspecting core GB, it looks like some headings use a line-height of 1.8 and some use 1.4 – not sure if they're following a scale or not. |
The line-height implementation is defined in the Android We could change that for each block but I'm not sure that's what you want (line-height and block padding are different things. I'll take screenshots with long lines after updating the headings padding in Aztec and check if that's what we want. |
This ticket looks closed by @mchowning but I only see Android side work on it. Aren't there still some iOS side adjustments that are pending? |
@hypest Looking at the latest internal beta, we seem mostly good on iOS, except the title seems to suffer the same issue that I mentioned above. Also realized that the Separator block line also isn't quite wide enough (screenshot), so I'll report that separately. |
I have created a ticket for the Post Title issue on iOS to keep this one closed. |
I'm pretty sure @SergioEstevao made some adjustments on the iOS side, I couldn't find the PR though. |
Since we last solved these issues looks like there might have been a regression in one of the last releases. There is some extra padding applied inside the body of text blocks (paragraph, heading, etc). It's slightly different between platforms:
iOS
There appears to be a slight bit of additional left/right padding. It's hard to tell if there's also extra padding on top/bottom edges of the blocks, so we should double check. Same thing applied to the title (only on iOS).
Android
It looks like extra top/bottom padding, but left/right looks aligned properly.
(Note: title block looks to have proper padding.)
Note
All blocks have inner padding of 12 top/bottom, 16 left/right, so the total vertical spacing between blocks is always 24.
The text was updated successfully, but these errors were encountered: