user2836797
user2836797

Reputation:

What is this syntax description language describing? Does it have a name or a standard?

I was reading about flexboxes on CSS tricks and came across this

flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]

Is there a name for this particular style of syntax? Is there a standard? How is one supposed to interpret it?

Upvotes: 0

Views: 27

Answers (1)

Ken Y-N
Ken Y-N

Reputation: 15018

It's a slightly modified BNF, Backus-Naur Form. This diagram specifically says the flex property is either blank (none) or has a flex-grow property, an optional flex-shrink (that's the ? at the end), and/or there is a flex-basis.

Upvotes: 2

Related Questions