-
Notifications
You must be signed in to change notification settings - Fork 802
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
Line-height as custom property not adding "px" to value #64
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: