Added support for margin configuration