mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 08:25:32 +00:00
18 lines
No EOL
387 B
TypeScript
18 lines
No EOL
387 B
TypeScript
/// <reference path="lengthStyle.ts" />
|
|
|
|
namespace com.keyman.osk {
|
|
export function getFontSizeStyle(e: HTMLElement|string): {val: number, absolute: boolean} {
|
|
var fs: string;
|
|
|
|
if(typeof e == 'string') {
|
|
fs = e;
|
|
} else {
|
|
fs = e.style.fontSize;
|
|
if(!fs) {
|
|
fs = getComputedStyle(e).fontSize;
|
|
}
|
|
}
|
|
|
|
return new ParsedLengthStyle(fs);
|
|
}
|
|
} |