Skip to content

Instantly share code, notes, and snippets.

@AndreiRadchenko
Forked from luxplanjay/flex-basis-calc.css
Created June 17, 2022 20:31
Show Gist options
  • Save AndreiRadchenko/4835a57e72cd45e023e4788fb50778bd to your computer and use it in GitHub Desktop.
Save AndreiRadchenko/4835a57e72cd45e023e4788fb50778bd to your computer and use it in GitHub Desktop.
Формула расчёта ширины flex-элемента в сетке
.element {
flex-basis: calc((100% - кол-во маржинов в строке * значение маржина) / кол-во элементов в строке);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment