# depicter/1.3.2/app/src/Document/Models/Common/Styles/BoxShadow.php

Depicter — Popup &amp; Slider Builder, version 1.3.2. 69 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.3.2/code/app/src/Document/Models/Common/Styles/BoxShadow.php
- Raw: https://pluginprobe.com/plugins/depicter/1.3.2/raw/app/src/Document/Models/Common/Styles/BoxShadow.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.3.2/code/app/src/Document/Models/Common/Styles/BoxShadow.php#L10-L20`.

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


use Depicter\Document\CSS\Breakpoints;

class BoxShadow extends States
{
	/**
	 * style name
	 */
	const NAME = 'box-shadow';

	/**
	 * @var int
	 */
	public $offsetX = 10;

	/**
	 * @var int
	 */
	public $offsetY = 10;

	/**
	 * @var int
	 */
	public $blur = 25;

	/**
	 * @var int
	 */
	public $spread = 0;

	/**
	 * @var bool
	 */
	public $inset = false;

	/**
	 * @var string
	 */
	public $color = '#000';

	public function set( $css ) {
		$devices = Breakpoints::names();
		foreach ( $devices as $device ) {
			if ( isset( $this->{$device}->enable ) ) {

				// If it is disabled in a breakpoint other than default, generate a reset style for breakpoint
				if( $device !== 'default' && ! empty( $this->default->enable )  && ! $this->{$device}->enable ) {
					$css[$device][ self::NAME ] = 'none';

				} elseif( $this->{$device}->enable ){
					$this->offsetX = $this->{$device}->offsetX ?? $this->offsetX;
					$this->offsetY = $this->{$device}->offsetY ?? $this->offsetY;
					$this->blur = $this->{$device}->blur ?? $this->blur;
					$this->spread = $this->{$device}->spread ?? $this->spread;
					$this->color = $this->{$device}->color ?? $this->color;
					$inset = !empty($this->{$device}->inset) ? 'inset ' : '';

					$css[$device][self::NAME] = $inset . $this->offsetX . "px " . $this->offsetY . 'px ' . $this->blur . 'px ' . $this->spread . 'px ' . $this->color;
				}
			}
		}

		return $css;
	}
}

```
