Bug #17271
closedCC logo is too close to page/post content
0%
git submodule update wp-content/plugins/cac-creative-commons
Description
https://khatchad.commons.gc.cuny.edu/teaching/csci-49380-79526-fa-20/#lladdlinktitle
The "Add Link" button is too close to the CC logo.
Files
Updated by Boone Gorges about 2 years ago
- Assignee set to Raymond Hoh
It looks like this is a result of cac-creative-commons using the 'entry-meta' class. The theme in question, academica, has a declaration `.entry-meta { padding: 0 0 20px; }`
Ray, do you have an idea about how best to address this? If cac-creative-commons was already loading a stylesheet, I would have just plopped some padding-top on the entry-meta-creative-commons element. But maybe you have a better idea.
Updated by Raffi Khatchadourian about 2 years ago
Boone Gorges wrote in #note-1:
It looks like this is a result of cac-creative-commons using the 'entry-meta' class. The theme in question, academica, has a declaration `.entry-meta { padding: 0 0 20px; }`
Ah, which may mean fixing this issue in academia may make it broken in other themes.
Updated by Raffi Khatchadourian about 2 years ago
Boone Gorges wrote in #note-1:
It looks like this is a result of cac-creative-commons using the 'entry-meta' class. The theme in question, academica, has a declaration `.entry-meta { padding: 0 0 20px; }`
Thinking about it some more, it would seem that this "bug" is the result of my theme choice. In that case, I don't think that CAC should make any changes. Instead, can't I add custom CSS to fix it on my site?
Updated by Boone Gorges about 2 years ago
I don't know that it's straightforwardly a bug anywhere, just a coincidence :)
Something like this should fix it on your site:
.entry-meta-creative-commons { padding-top: 10px; }
Updated by Raymond Hoh about 2 years ago
Thinking about it some more, it would seem that this "bug" is the result of my theme choice. In that case, I don't think that CAC should make any changes. Instead, can't I add custom CSS to fix it on my site?
It's not actually due to your theme. If you remove the "Add New Link" portion from your page content, then there is spacing between the page content and the Creative Commons logo. You could also solve this by adding some custom CSS for the "Add New Link" block:
.lladdlink { margin-bottom: 16px; }
I don't know that it's straightforwardly a bug anywhere, just a coincidence :)
Yeah, this :)
If cac-creative-commons was already loading a stylesheet, I would have just plopped some padding-top on the entry-meta-creative-commons element. But maybe you have a better idea.
I didn't really want to add a new stylesheet and network request just for one CSS declaration. With that being said, I can add the following inline CSS declaration with wp_add_inline_style()
:
.entry-meta-creative-commons { clear: both; margin-top: 1em; }
How does that sound?
Updated by Boone Gorges about 2 years ago
- Target version set to 2.0.12
How does that sound?
Yeah, that sounds good to me. Thank you sir!
Updated by Raffi Khatchadourian about 2 years ago
Boone Gorges wrote in #note-4:
I don't know that it's straightforwardly a bug anywhere, just a coincidence :)
Something like this should fix it on your site:
[...]
That worked. I made it 30px
. Thanks!
Updated by Raymond Hoh almost 2 years ago
- Status changed from New to Staged for Production Release
- Deployment actions updated (diff)
With that being said, I can add the following inline CSS declaration with wp_add_inline_style()
Added in https://github.com/cuny-academic-commons/cac/commit/34f70e226c41f8e77cf0e7084279088b57fecad0. Boone, I've added a note to the Deployment actions
section of this ticket.
Updated by Raffi Khatchadourian almost 2 years ago
Raymond Hoh wrote in #note-8:
With that being said, I can add the following inline CSS declaration with wp_add_inline_style()
Added in https://github.com/cuny-academic-commons/cac/commit/34f70e226c41f8e77cf0e7084279088b57fecad0. Boone, I've added a note to the
Deployment actions
section of this ticket.
When this is deployed, will the CSS changes I made now break the site?
Updated by Boone Gorges almost 2 years ago
No, nothing should be broken, but you may want to verify that the amount of padding still suits your taste.
Updated by Boone Gorges almost 2 years ago
- Status changed from Staged for Production Release to Resolved
Updated by Raffi Khatchadourian almost 2 years ago
Boone Gorges wrote in #note-10:
No, nothing should be broken, but you may want to verify that the amount of padding still suits your taste.
Great. When you deploy it (can you let me know?), I'll check it. Thanks again!
Updated by Raffi Khatchadourian almost 2 years ago
Updated by Raymond Hoh almost 2 years ago
Thanks. I didn't see a difference.
If you remove your custom padding-top
CSS, you should see a small gap where there wasn't one prior (granted the gap is not that big!). We could consider changing the value of the gap to margin-top: 2em
instead of 1em
, but I'm not sure how big the gap should be across all sites. I think 2em
should be fine, but I wanted to be conservative at least for now.
As Boone mentioned though, the good thing is all site owners have access to write custom CSS, so if the gap isn't to your liking, you can increase the gap to whatever you want.
Updated by Raffi Khatchadourian almost 2 years ago
Thanks again. I kinda like the gap right now.