| 1 |
<?php |
| 2 |
namespace Depicter\Document\Models\Common\Styles; |
| 3 |
|
| 4 |
|
| 5 |
use Depicter\Document\CSS\Breakpoints; |
| 6 |
|
| 7 |
class BlendingMode extends States |
| 8 |
{ |
| 9 |
/** |
| 10 |
* style name |
| 11 |
*/ |
| 12 |
const NAME = 'mix-blend-mode'; |
| 13 |
|
| 14 |
public function set( $css ) { |
| 15 |
$devices = Breakpoints::names(); |
| 16 |
foreach ( $devices as $device ) { |
| 17 |
if ( isset( $this->{$device}->enable ) ) { |
| 18 |
|
| 19 |
// If it is disabled in a breakpoint other than default, generate a reset style for breakpoint |
| 20 |
if( $device !== 'default' && ! empty( $this->default->enable ) && ! $this->{$device}->enable ) { |
| 21 |
$css[$device][ self::NAME ] = 'normal'; |
| 22 |
|
| 23 |
} elseif( ! empty( $this->{$device}->type ) && $this->{$device}->enable ) { |
| 24 |
$css[ $device ][ self::NAME ] = $this->{$device}->type; |
| 25 |
} |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
return $css; |
| 30 |
} |
| 31 |
} |
| 32 |
|