Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Best practice to overriding default value from a definition in another definition? #989

Answered by mpvl
leitzler asked this question in Q&A
Discussion options

You must be logged in to vote

In general, a good approach is to not have any defaults in the base template, and then add them later as one desires.

In this case, the issue is that bar introduces a disjunction without a default. To ensure it "reaches" the newDefault value, you could write

	bar: #AB | *{ // <---- NOTE THE ADDED DEFAULT MARKER 
		b: #B & {bf: "newDefault"}
	}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by leitzler
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants