-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Reinstate a smaller margin between struct tables #1178
Reinstate a smaller margin between struct tables #1178
Conversation
Without a margin, things look poor if the last row is blue: it then merges into the caption at the top of the next table. I've also added a small border because I think it helps to break things up a little.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a reasonable compromise, I guess.
It does mean that there is a bit of a gap before, for example, the AuthData
table at https://pr1178--matrix-spec-previews.netlify.app/client-server-api/#backup-algorithm-mmegolm_backupv1curve25519-aes-sha2.
That lead me into a rabbithole of wondering why other definition tables don't have this problem, and that in turn led me to this bit of CSS. which overrides the margin for a table when it follows an h2
or h3
:
matrix-spec/assets/scss/custom.scss
Lines 310 to 312 in 79e3b7e
h2 + table, h3 + table, h3 + div.highlight { | |
margin-top: 0; | |
} |
I wonder if it would be better to flip this around and instead specify a margin only when a table is followed by another table? wdyt?
I've done this over at #1192, since I was poking in the area.
I don't disagree, but it also adds a second line after the 'Requires authentication' line, which looks a bit odd. I'm working on some other changes which I hope will make this easier. |
Is this now superseded/made defunct by #1192?
Arg, yes. Some more classes on the tables would help here.
I'm kind of surprised we need those kind of selectors, given that margin collapse is A Thing. But I'm naive and my CSS knowledge is largely stuck in the previous decade. No strong opinions though. |
I think so? But up to you to figure out if there's anything here that you still want.
You and me both. There may well be better ways to do this. |
Looking at your changes as rendered on https://spec.matrix.org/unstable/client-server-api/ I'm happy---the original complaint is fixed. Thanks! |
Without a margin, things look poor if the last row is blue: it then
merges into the caption at the top of the next table.
I've also added a small border because I think it helps to break things
up a little.
Before:![Before](https://user-images.githubusercontent.com/8614563/180253738-16fc1ea8-c53f-46f9-9132-a7537cd21804.png)
![after](https://user-images.githubusercontent.com/8614563/180266911-2943828c-5373-4c90-b4da-15c7782d745c.png)
After:
Xref: ea42cd3#r79080321 and #1166 (comment)
Preview: https://pr1178--matrix-spec-previews.netlify.app