| @@ -83,17 +83,11 @@ | ||
| 83 | 83 | $device, |
| 84 | 84 | self::get_attribute_default_value() |
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | - // Get responsive unit (delegates to your get_unit function) | |
| 88 | - $unit = self::get_unit( | |
| 89 | - [ | |
| 90 | - 'unit' => Helper::get_responsive_value( $attribute_value, 'customWidthUnit', 'Desktop' ), | |
| 91 | - 'unitTablet' => Helper::get_responsive_value( $attribute_value, 'customWidthUnit', 'Tablet' ), | |
| 92 | - 'unitMobile' => Helper::get_responsive_value( $attribute_value, 'customWidthUnit', 'Mobile' ), | |
| 93 | - ], | |
| 94 | - $device | |
| 95 | - ); | |
| 87 | + // The device's own unit, else the nearest containing wider | |
| 88 | + // device's (custom breakpoints included), else Desktop's. | |
| 89 | + $unit = Helper::get_responsive_value( $attribute_value, 'customWidthUnit', $device ); | |
| 96 | 90 | |
| 97 | 91 | $css[ $property ] = $custom_width . $unit; |
| 98 | 92 | }//end if |
| 99 | 93 | }//end if |