Added support for padding to the background logic in Component.