inherit static method
Implementation
static FontSize? inherit(FontSize? parent, FontSize? child) {
if (child != null && parent != null) {
if (child.unit == Unit.em) {
return FontSize(child.value * parent.value);
} else if (child.unit == Unit.percent) {
return FontSize(child.value / 100.0 * parent.value);
}
return child;
}
return parent;
}