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

Method _get_gridX

Lib/pagebot/elements/element.py:1850–1861  ·  view source on GitHub ↗

Answers the grid, depending on the left / right orientation of self. >>> from pagebot.toolbox.units import mm >>> e = Element(w=mm(210), gridX=((mm(60), mm(5)), (mm(80), None))) >>> e.gridX # Two columns with gutter. ((60mm, 5mm), (80mm, None)) >>> e.gridX =

(self)

Source from the content-addressed store, hash-verified

1848 isRight = property(_get_isRight)
1849
1850 def _get_gridX(self):
1851 """Answers the grid, depending on the left / right orientation of self.
1852
1853 >>> from pagebot.toolbox.units import mm
1854 >>> e = Element(w=mm(210), gridX=((mm(60), mm(5)), (mm(80), None)))
1855 >>> e.gridX # Two columns with gutter.
1856 ((60mm, 5mm), (80mm, None))
1857 >>> e.gridX = (mm(60), mm(5)), (mm(80), None)
1858 >>> e.gridX
1859 ((60mm, 5mm), (80mm, None))
1860 """
1861 return units(self.css('gridX'))
1862
1863 def _set_gridX(self, gridX):
1864 self.style['gridX'] = gridX # Save locally, blocking CSS parent scope for this param.

Callers

nothing calls this directly

Calls 2

cssMethod · 0.95
unitsFunction · 0.90

Tested by

no test coverage detected