Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between padding-left and padding-start?

While inspecting some code I found this new declaration: -webkit-padding-start but I am been unable to understand what is the difference with the existing padding-left property. I have already read the page on Mozilla Developers and created a fiddle, but I am still unsure.

like image 737
Mimo Avatar asked Oct 25 '13 06:10

Mimo


1 Answers

Apart from -webkit-padding-start being nonstandard, the difference is that when writing direction is right to left, -webkit-padding-start puts padding to the right (effectively, gets converted to padding-right).

If the property were standardized, it would be useful for style sheets that are meant to be used for documents containing texts in different writing systems. You could then put padding at the start of text, provided that you have set the dir attribute in HTML or the direction property in CSS properly to correspond the directionality. So the padding would be on the left of the start of text e.g. in Western languages but to the right of the start of the text (which runs from right to left) e.g. in Arabic, Persian, or Hebrew texts.

like image 74
Jukka K. Korpela Avatar answered Oct 08 '22 22:10

Jukka K. Korpela