@import 'plaintext';

* {
	display: block;
}

description > para {
	margin: 1;
}
synopsis::before {
	content: "resholve ";
}

literal, literal_arg {
	&::before, &::after {
		space: '';
	}
	&::before {
		content: "`" attr(quote);
	}
	&::after {
		content: attr(quote) "`";
	}
}

arg {
	// TODO could merge this one w/ above?
	&::before, &::after {
		space: '';
	}
	&::before {
		content: "`<";
	}
	&::after {
		content: ">`";
	}
}

argument {
	display: word;
}

argument[optional=true] {
	&::before {
		content: "[";
	}
	&::after {
		content: "]";
	}
}

insert {
	// TODO could merge this one w/ above?
	&::before, &::after {
		display: line;
	}
	&::before {
		content: "```" attr(language);
	}
	&::after {
		content: "```";
	}
}

arguments.table {
	&::before,
	flag,
	argument {
		display: line;
	}
	&::before {
		content:
			"| Option | Type | Containing |\A"
			"|--------|------|------------|";
	}
	> {
		::before,
		flag > :not(api):first-of-type::before,
		argument > :not(api):first-of-type::before,
		flag > api > *:first-of-type::before,
		argument > api > *:first-of-type::before
		{
			content: "| ";
		}
		::after {
			content: " |";
		}
	}

	flag, argument {
		&::before, &::after {
			display: word;
		}
		&::before {
			content: "| " attr(id);
		}
		* {
			display: word;
			&::before, &::after {
				display: word;
			}
		}
		purpose {
			display: char;

			seealso {
				display: none;
			}
		}
		&[nix_name]::before {
			content: "| " attr(nix_name);
		}
	}
	// TODO: could be better
	argument#script > purpose > *:not(terse),
	.directives > forms,
	flag.meta,
	flag#overwrite,
	flag#path > :not(.nix) {
		display: none;
	}
}
