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

Only add margin to consecutive paragraphs #1409

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Only add margin to consecutive paragraphs #1409

merged 1 commit into from
Sep 16, 2024

Conversation

thatbudakguy
Copy link
Member

@thatbudakguy thatbudakguy commented Sep 12, 2024

This overrides a geoblacklight style to prevent extra margin from being added to item descriptions.

Before

Screenshot 2024-09-12 at 15 37 28

After

Screenshot 2024-09-12 at 15 37 40

@thatbudakguy thatbudakguy marked this pull request as ready for review September 12, 2024 22:39
@jcoyne
Copy link
Contributor

jcoyne commented Sep 16, 2024

@dbranchini have you reviewed this?

@thatbudakguy which GeoBlacklight style are you referring to? Should this be changed in GBL instead?

@dbranchini
Copy link

On the surface, it looks like a good idea, but I haven't seen this working. Can I review this somewhere @thatbudakguy or maybe hop on a quick call to see it on your local instance?

@thatbudakguy
Copy link
Member Author

Sure, I can deploy this to UAT. As far as I'm aware, there's only one place this can effect, which is descriptions on item pages.

It's not a GBL override because GBL doesn't actually create consecutive paragraphs; we override the presentation of the description field to render it as multiple paragraphs.

@thatbudakguy
Copy link
Member Author

Deployed to UAT.

@jcoyne
Copy link
Contributor

jcoyne commented Sep 16, 2024

@thatbudakguy I'm confused what you're meaning when you wrote:

This overrides a geoblacklight style

but then

It's not a GBL override

Can you clarify that for me?

@thatbudakguy
Copy link
Member Author

Yes, sorry – it's confusing!

There are two declarations added in this PR that work together.

/* Geoblacklight override: only add margin for consecutive paragraphs */
p {
  margin-bottom: 0;
}

This one is a Geoblacklight override, because Geoblacklight sets a global p style. However, it doesn't actually use p to render the description (it was unclear to me where, if at all, there are p in Geoblacklight, but I elected to leave it alone there).

p + p {
  margin-top: 1rem;
}

This one is not a Geoblacklight override, because only Earthworks chooses to render descriptions as consecutive p.

@jcoyne
Copy link
Contributor

jcoyne commented Sep 16, 2024

@jcoyne
Copy link
Contributor

jcoyne commented Sep 16, 2024

My concern here is that this is very broadly scoped. Can you do this only scoped to .document-metadata p?

@thatbudakguy
Copy link
Member Author

Sure, that makes sense. Updated.

@jcoyne jcoyne merged commit 95e7c58 into main Sep 16, 2024
2 checks passed
@jcoyne jcoyne deleted the paragraph-margins branch September 16, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants