scripting / feedlandBlogrollToolkit

Browser-based JavaScript code, html and styles for adding an OPML-based blogroll to a website, with a connection back to FeedLand for realtime updates.
MIT License
3 stars 0 forks source link

Special CSS for WordPress plugin? #5

Open scripting opened 5 months ago

scripting commented 5 months ago

I have a puzzle I still haven't figured out, why are the objects taller in the WordPress plugin than they are in blogrolls on my sites.

Until we figure that out, assuming we ever figure it out, we're going to need to be able to add some styles just for the WP plugin.

If I give you another CSS file to include, say wpblogroll.css, can you include that after blogroll.css, so it can override it?

PS: I wrote the problem up briefly here.

fmfernandes commented 5 months ago

I think the line-height has a relation with what's defined on the root element, body. For feedland.blog, if you view the source code, it's defined in the <style id='global-styles-inline-css'> to be 1.6. I think that has some influence when blogroll.css sets the line-height to normal. Though, I'm not sure as I'm no expert in CSS 😅

If I give you another CSS file to include, say wpblogroll.css, can you include that after blogroll.css, so it can override it?

But yeah, this is possible. But since that line-height setting may change across WordPress themes, I think that for wathever value works for feedland.blog, it might not work always everywhere.

scripting commented 5 months ago

@fmfernandes -- that is really interesting.

I'll try an experiment.

scripting commented 5 months ago

I did try an experiment, manually set the line-height in the body on the WP test page, and it had no effect on the spacing of the lines in the blogroll.

I'd love to solve the mystery, that's the best way to go, but if we can't, allowing the ability to add special purpose styles for WP might be flexibility we'll be glad to have later.

Let's keep this in mind in the next few weeks.