# depicter/1.5.2/app/src/Document/Models/Common/Styles/Padding.php

Depicter — Popup &amp; Slider Builder, version 1.5.2. 29 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.5.2/code/app/src/Document/Models/Common/Styles/Padding.php
- Raw: https://pluginprobe.com/plugins/depicter/1.5.2/raw/app/src/Document/Models/Common/Styles/Padding.php
- Modified: 2022-06-01T06:26:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/depicter/1.5.2/code/app/src/Document/Models/Common/Styles/Padding.php#L10-L20`.

```php
<?php
namespace Depicter\Document\Models\Common\Styles;


use Depicter\Document\CSS\Breakpoints;

class Padding extends States
{
	/**
	 * style name
	 */
	const NAME = 'padding';

	public function set( $css ) {
		$devices = Breakpoints::names();
		foreach ( $devices as $device ) {
			if ( ! empty( $this->{$device} ) ) {
				if ( $this->{$device}->link ) {
					$css[ $device ][ self::NAME ] = $this->{$device}->top->value . $this->{$device}->top->unit;
				} else {
					$css[ $device ][ self::NAME ] = $this->{$device}->top->value . $this->{$device}->top->unit . ' ' . $this->{$device}->right->value . $this->{$device}->right->unit . ' ' . $this->{$device}->bottom->value . $this->{$device}->bottom->unit . ' ' . $this->{$device}->left->value . $this->{$device}->left->unit;
				}
			}
		}

		return $css;
	}
}

```
