unit

cqh — CSS reference

One cqh is one hundredth of the query container’s physical height. Container lengths use the nearest eligible ancestor for the required axis, not the styled element itself or necessarily its direct parent. If no eligible ancestor exists for an axis, the small viewport dimension for that axis is used. The query refers to the container content box, excluding its padding and border. Use a suitable container-type and constrain the container independently of the child.

Formal Syntax & Structure

css syntaxcss
width: 10cqh;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Relative length lab</title><style>body {margin:0} .sample {height:12px;background:#006050}#container {container-type:size;width:240px;height:160px;padding:10px;border:2px solid} #a {width:10cqh} #b {width:10cqh}</style><body><section id="container"><div id="a" class="sample"></div></section><div id="b" class="sample"></div></body></html>
CSS Reference