mercredi 23 janvier 2019

Handling directed margin and padding when changing the direction

When changing the html dir attribute from ltr to rtl, all directed margins and paddings need to be reversed :

[dir='ltr'] {
  margin-left: 80px;
}

[dir='rtl'] {
  margin-right: 80px;
}

Is there another better approach?




Aucun commentaire:

Enregistrer un commentaire