CKTIS / CSS
corner-bottom-right-shape — oblik donjeg desnog kuta
Svojstvo corner-bottom-right-shape određuje oblik fizičkog donjeg desnog kuta. Djeluje zajedno s border-bottom-right-radius: polumjer određuje veličinu područja kuta, a oblik njegov obris.
Verzija: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Sintaksa
corner-bottom-right-shape: round | scoop | bevel | notch | square | squircle | superellipse(<number> | infinity | -infinity);corner-bottom-right-shape odnosi se na fizički donji desni kut, neovisno o smjeru pisanja. Ne nasljeđuje se; početna mu je vrijednost round.
Dostupni oblici su round (konveksna četvrtina elipse), scoop (konkavna četvrtina elipse), bevel (dijagonalni odrez), notch (konkavni pravi kut), square (konveksni pravi kut) i squircle (krivulja između round i square). Funkcija superellipse() omogućuje parametriziranje oblika.
Veličinu određuje border-bottom-right-radius, a ne ovo svojstvo. Pri polumjeru 0 promjena oblika nema vidljiv učinak. Primjer kombinira 32px s bevel; bez podrške za svojstvo kut ostaje zaobljen.
Ova je funkcija opisana u specifikaciji koja se razvija. Primjer je pokrenut u izoliranom okruženju s preglednikom Chromium 157, a ispis u konzoli točno se podudarao s očekivanim rezultatom. Test ne potvrđuje kompatibilnost s preglednikom Chromium 152 niti provjerava izgled iscrtanog kuta. Provjerite podršku i izgled u ciljnom pregledniku.
Primjeri
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bottom-right corner shape</title>
<style>
#tile {
width: 160px;
height: 100px;
background: #006699;
border-bottom-right-radius: 32px;
corner-bottom-right-shape: bevel;
}
</style>
</head>
<body>
<div id="tile" role="img" aria-label="Blue sample tile" aria-describedby="status"></div>
<p id="status" role="status"></p>
<script>
const property = 'corner-bottom-right-shape';
const supported = CSS.supports(property, 'bevel');
const style = getComputedStyle(document.getElementById('tile'));
const shape = style.getPropertyValue(property);
const radius = style.borderBottomRightRadius;
const ok = radius === '32px' && (supported ? (shape === 'bevel' || shape === 'superellipse(0)') : shape === '' || shape === 'round');
document.getElementById('status').textContent = supported
? `Supported. Computed bottom-right shape: ${shape}; radius: ${radius}.`
: `Unsupported. The ${radius} bottom-right radius provides the rounded fallback.`;
console.log(`Bottom-right corner check: ${ok ? 'PASS' : 'FAIL'}`);
</script>
</body>
</html>Rezultat
Bottom-right corner check: PASS
Primjer je pokrenut u izoliranoj instanci preglednika Chromium 157.0.8103.51 s blokiranim vanjskim zahtjevima. Ispis u konzoli točno se podudarao s očekivanim rezultatom: `Bottom-right corner check: PASS`.