Both form and comparative meaning matter.
Ism al-Tafḍīl: Formation, Comparison, Agreement and Parsing