(value: string | CoreTypes.PercentLengthType)
| 217 | } |
| 218 | |
| 219 | function convertToMargins(value: string | CoreTypes.PercentLengthType): [CssProperty<Style, CoreTypes.PercentLengthType>, CoreTypes.PercentLengthType][] { |
| 220 | if (typeof value === 'string' && value !== 'auto') { |
| 221 | const thickness = parseShorthandPositioning(value); |
| 222 | |
| 223 | return [ |
| 224 | [marginTopProperty, PercentLength.parse(thickness.top)], |
| 225 | [marginRightProperty, PercentLength.parse(thickness.right)], |
| 226 | [marginBottomProperty, PercentLength.parse(thickness.bottom)], |
| 227 | [marginLeftProperty, PercentLength.parse(thickness.left)], |
| 228 | ]; |
| 229 | } else { |
| 230 | return [ |
| 231 | [marginTopProperty, value], |
| 232 | [marginRightProperty, value], |
| 233 | [marginBottomProperty, value], |
| 234 | [marginLeftProperty, value], |
| 235 | ]; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | function convertToPaddings(value: string | CoreTypes.LengthType): [CssProperty<Style, CoreTypes.LengthType>, CoreTypes.LengthType][] { |
| 240 | if (typeof value === 'string' && value !== 'auto') { |
nothing calls this directly
no test coverage detected