question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

why is .css('font-size') returning undefined?

See original GitHub issue

.css('font-size') on a jquery object returns undefined.

Is it possible to get the value of .css('font-size') coming form an external css file?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
zoe1337commented, Aug 16, 2017

A warning in the docs would be appreciated!

0reactions
wearherecommented, May 7, 2016

This is actually a difference from jQuery’s $.css, which gets the value of computed styles. What is your policy around maintaining compatibility with jQuery? Would you consider adding a warning here, if not renaming the method? Glad to make a PR for either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

element.style.fontSize does not return size - Stack Overflow
fontsize is improper capitalization ; that's why your second alert is returning undefined . If you want the font size of an element...
Read more >
when an element's width is undefined, what determines it?
I am pasting the css stylesheet in its entirety. ... margin-left: auto; margin-right: auto; width: 90%; } p.return { font-size: 2em; } ...
Read more >
HTML DOM Style fontSize Property - W3Schools
Definition and Usage. The fontSize property sets or returns the font size of the text. ... Syntax. Return the fontSize property: object.style.fontSize.
Read more >
How to Change Font Size in CSS - HubSpot Blog
Learn how to change the size of different elements on your web page using the font-size property in CSS.
Read more >
Font Size Problems? Check Here First! - Codecademy
If you find you're getting a really weird font-size reported back to you, such as 18.1818181818px , the problem is that your browser's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found