You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: After I finished writing the post below, I remembered that line-height is not always neccassarily a px value. It could be a multitude of different values. Either way, I'll still ask the question why is the px missing from a custom property of line-height and whether or not the plugin knows this. I searched the code for the word line-height and didn't find it, so I'm guessing it does not explicitly know to add px or not to line-height.
I saw there were a few other line-height related issues that were opened/closed, but none of them answered my question specifically, although they eluded to it. Anyway, when using line-height as my custom option in the plugin, it does not apply px to the inline style. My code looks like this:
What I'm trying to do is set both the height and line-height of a div. My div ends up looking like this <div class="product-tile" style="height: 200px; line-height: 200"></div>.
Is this a limitation of the plugin? Or a possible bug? I saw a workaround in another issue is to just manually loop through the items and apply the property to them with jQuery's .css() method. This way is of course valid, I just wasn't sure if there was a limitation or bug in particular that prevents line-height from working.
For now I am doing this hack in the plugin code, around line 251:
I need to test a little more, but I think you are right. My guess is that since the unit is not specified, jQuery will fallback to a default unit which for 'line-height' seems to be unit-less.
As a side note, if you're looking to do vertical alignment then check out issue #53.
I think I'll try get this one fixed either way though.
Note: After I finished writing the post below, I remembered that
line-height
is not always neccassarily apx
value. It could be a multitude of different values. Either way, I'll still ask the question why is thepx
missing from a custom property ofline-height
and whether or not the plugin knows this. I searched the code for the wordline-height
and didn't find it, so I'm guessing it does not explicitly know to addpx
or not toline-height
.I saw there were a few other
line-height
related issues that were opened/closed, but none of them answered my question specifically, although they eluded to it. Anyway, when usingline-height
as my custom option in the plugin, it does not applypx
to the inline style. My code looks like this:What I'm trying to do is set both the
height
andline-height
of adiv
. Mydiv
ends up looking like this<div class="product-tile" style="height: 200px; line-height: 200"></div>
.Is this a limitation of the plugin? Or a possible bug? I saw a workaround in another issue is to just manually loop through the items and apply the property to them with jQuery's
.css()
method. This way is of course valid, I just wasn't sure if there was a limitation or bug in particular that preventsline-height
from working.For now I am doing this hack in the plugin code, around line 251:
The text was updated successfully, but these errors were encountered: