Animation.php
1 year ago
Background.php
1 year ago
BackgroundImage.php
1 year ago
Border.php
2 years ago
BoxShadow.php
1 year ago
ColumnWidth.php
1 year ago
CustomHeight.php
1 year ago
CustomSize.php
4 years ago
Gap.php
1 year ago
Height.php
1 year ago
JustifyContent.php
1 year ago
MaxWidth.php
1 year ago
MultipleImage.php
1 year ago
ObjectCss.php
1 year ago
Opacity.php
1 year ago
Property.php
1 year ago
PropertyBase.php
1 year ago
Size.php
1 year ago
Stroke.php
1 year ago
TBLR.php
1 year ago
TextShadow.php
1 year ago
Transform.php
2 years ago
Transition.php
1 year ago
Typography.php
1 month ago
UnitValuePercentage.php
1 year ago
UnitValuePx.php
1 year ago
ValueProxy.php
4 years ago
Width.php
1 year ago
TBLR.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Kubio\Core\StyleManager\Props; |
| 4 | |
| 5 | use Kubio\Core\StyleManager\ParserUtils; |
| 6 | use function join; |
| 7 | |
| 8 | class TBLR extends PropertyBase { |
| 9 | public function computeTBLRCss( $prefix, $style, $obj ) { |
| 10 | foreach ( $obj as $name => $value ) { |
| 11 | ParserUtils::addValueUnitString( $style, join( '-', array( $prefix, $name ) ), $value ); |
| 12 | } |
| 13 | return $style; |
| 14 | } |
| 15 | |
| 16 | public function parse( $value, $options ) { |
| 17 | $defaultValue = $this->config( 'default' ); |
| 18 | $obj = new ValueProxy( $value, $defaultValue ); |
| 19 | return $this->computeTBLRCss( $this->name, array(), $obj->mergedValue ); |
| 20 | } |
| 21 | } |
| 22 |