# depicter/1.9.2/app/src/Document/Models/Common/Styles/BackgroundBlur.php

Depicter — Popup &amp; Slider Builder, version 1.9.2. 50 lines.

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

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

use Depicter\Document\CSS\Breakpoints;

class BackgroundBlur extends States
{
	/**
	 * style name
	 */
	const NAME = 'backdrop-filter';

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

	/**
	 * @var int
	 */
	public $opacity = 100;

	/**
	 * @var int
	 */
	public  $brightness = 100;

	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->blur = $this->{$device}->blur ?? $this->blur;
					$this->brightness = $this->{$device}->brightness ?? $this->brightness;
					$this->opacity = $this->{$device}->opacity ?? $this->opacity;

					$css[$device][self::NAME] = "blur(" . $this->blur . "px) brightness(" . $this->brightness . "%) opacity(" . $this->opacity . "%)";
				}
			}
		}

		return $css;
	}
}

```
