Calculating flex-basis Values and Margins

Learn to create a simple Sass function that calculates your flex-basis value, including flexible margins. The per-line() function places the number of flex items defined on one line (if the available space allows it). As a result, your flex items will line up perfectly across multiple flex lines.

See the Pen flex-basis Function by Guil H (@Guilh) on CodePen.

comments powered by Disqus