added types for px, %, and em, as well as Matrix which type-supports 1-4 values for css shorthands (i.e. padding: 0 10% 6em 4px;)
updated MJML component script to use Matrix when parsing {1,4} from MJML types (example from source), with appropriate units (px, %, em)
single value props are also changed to Pixel, Percentage, Ephemeral types where possible
updated imports on script template and regenerated components
Note: typically the only unit-less number you can have as a CSS prop is "0", so the new type definition of allowing any number without a unit is not as strict as it could be, but props like flex accept other unit-less numbers than "0", so this can be addressed later on in cases if needed
Updated Tests
New Type Checking in Web-Email-Server (after yarn link)
@IanEdington I updated the types for all props, not just those that use shorthand/Matrix, so there are a lot more changed props as you were expecting now
Addresses #24.
Matrix
which type-supports 1-4 values for css shorthands(i.e.
padding: 0 10% 6em 4px;
)Matrix
when parsing{1,4}
from MJML types (example from source), with appropriate units (px, %, em)Pixel
,Percentage
,Ephemeral
types where possibleNote: typically the only unit-less number you can have as a CSS prop is "0", so the new type definition of allowing any number without a unit is not as strict as it could be, but props like
flex
accept other unit-less numbers than "0", so this can be addressed later on in cases if neededUpdated Tests
New Type Checking in Web-Email-Server (after
yarn link
)