KennisbankExamencentrum
NL · NLNederlands (Nederland)
Taal kiezen13

CKTIS / CSS

hyphenate-limit-chars — CSS-eigenschap

`hyphenate-limit-chars` regelt minimale lengtes van woorddelen bij woordafbreking.

Versie: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

[ auto | <integer> ]{1,3}

hyphenate-limit-chars regelt minimale lengtes van woorddelen bij woordafbreking.

Het voorbeeld gebruikt een smal blok met een zacht afbreekteken of automatische afbreking en meldt hoogte en berekende waarde.

De geaccepteerde grammatica is [ auto | <integer> ]{1,3}; globale waarden blijven deelnemen aan de cascade.

Automatische afbreking hangt af van taal en woordenboek; het zachte teken verschijnt alleen als daar werkelijk wordt afgebroken.

Voorbeelden

<!doctype html>
<html lang="en"><meta charset="utf-8"><title>CKTIS CSS reference example</title>
<body><div class="probe">probe</div><pre id="result"></pre><script>
const x=document.querySelector(".probe");x.lang="en";x.textContent="extraordinary";x.style.cssText="width:55px;font:16px/20px sans-serif;hyphens:auto;hyphenate-limit-chars:6 3 2";document.querySelector("#result").textContent="lines="+Math.round(x.getBoundingClientRect().height/20)+"; computed="+getComputedStyle(x).hyphenateLimitChars;
</script></body></html>

Resultaat

lines=1; computed=6 3 2

Het voorbeeld is lokaal uitgevoerd in een geïsoleerde Chrome-sessie zonder netwerk; het resultaat komt uit de CSS-API van de browser.

Bronnen