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)
| 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) |