Custom Divi Modules
Custom Padding & Margin Field (Mobile Responsive)
PHP
Create the custom margin field to display in the Design > Spacing toggle.
Inside the render() function set up the margin/padding and responsive props.
Render the default/desktop, tablet & mobile CSS.
JSX
Sources
https://github.com/elegantthemes/create-divi-extension/issues/125#issuecomment-445442095