<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_valid_length(value, expected) {
  test_valid_value('letter-spacing', value, expected);
  test_valid_value('letter-spacing', `calc(${value})`, expected);
}

test_valid_length('clamp(1px, 2px, 3px)', 'calc(2px)');
test_valid_length('clamp(1px, 2px, clamp(2px, 3px, 4px))', 'calc(2px)');

</script>
