MCPcopy Create free account
hub / github.com/PageBot/PageBot / _get_tracking

Method _get_tracking

Lib/pagebot/elements/element.py:1684–1694  ·  view source on GitHub ↗

Answers the current tracking value as defined in style. Text based inheriting elements may want to implement tracking as the value of the last added text. >>> from pagebot.toolbox.units import em >>> e = Element(style=dict(tracking=em(0.05))) >>> e.tracking

(self)

Source from the content-addressed store, hash-verified

1682 leading = property(_get_leading, _set_leading)
1683
1684 def _get_tracking(self):
1685 """Answers the current tracking value as defined in style. Text based
1686 inheriting elements may want to implement tracking as the value of the last
1687 added text.
1688
1689 >>> from pagebot.toolbox.units import em
1690 >>> e = Element(style=dict(tracking=em(0.05)))
1691 >>> e.tracking
1692 0.05em
1693 """
1694 return self.css('tracking', DEFAULT_TRACKING)
1695 def _set_tracking(self, tracking):
1696 """Store the tracking in the local style."""
1697 self.style['tracking'] = units(tracking)

Callers

nothing calls this directly

Calls 1

cssMethod · 0.95

Tested by

no test coverage detected