Tanbir Regarding the menu modifiers I mentioned above, it seems the ability to add menu sizes is already possible with menu options.
In your case, you'll create two menu items A and B.
And, create two menu options, Small Size and Medium Size
Attach the Small Size and Medium Size menu options to Menu item A and B respectively.
Here's what it looks like when added to cart.