Fix headless padding and viewport support (#157).