Favorites

CSS <angle-percentage> Data Type

<angle-percentage>
CSS Data TypeThis data type is supported by all modern browsers.
Updated 21st November 2026

The <angle-percentage> data type is a value that can be either an <angle> or a <percentage>, where the percentage resolves to an angle.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The <angle-percentage> CSS data type represents a value that can be either an <angle> or a <percentage>. It appears in property and function syntax wherever a percentage can stand in for an angle. When a percentage is used, it is resolved against a reference angle defined by the context; in practice that is almost always a full turn of 360deg, so 25% equals 90deg.

The main place you will meet <angle-percentage> is the color stops of conic-gradient() and repeating-conic-gradient(). A conic gradient sweeps around a centre point, and each color stop says where around the circle that color sits. Writing stops as percentages is often more natural, for example for pie charts, where a slice of 30% of the data is simply 0% 30%. Angles and percentages can be mixed in the same gradient and combined in calc().

Not every property that accepts an angle accepts a percentage. For example, rotate(), skew(), hue-rotate() and the gradient direction of linear-gradient() only accept <angle> values, so rotate(25%) is invalid. Check the syntax of each property before using a percentage.

Examples

/* Pie chart with percentage stops */
.pie {
  border-radius: 50%;
  background: conic-gradient(
    #2563eb 0% 45%,
    #16a34a 45% 75%,
    #f59e0b 75% 100%
  );
}

/* The same stops written as angles */
.pie-angles {
  background: conic-gradient(#2563eb 0deg 162deg, #16a34a 162deg 270deg, #f59e0b 270deg 360deg);
}

/* Angles and percentages can be mixed */
.mixed {
  background: conic-gradient(from 45deg, red 0deg 25%, orange 25% 180deg, yellow 180deg 100%);
}

Interactive Demo

Demo Code
HTML Code
<div class="demo-element"></div>
CSS Code
.demo-element {
	width: 150px;
	height: 150px;
	margin: 10px;
	border-radius: 50%;
	background: conic-gradient(#f72585 0 var(--slice), #e7ecff 0);
	outline: 2px solid #4361ee;
	--slice: 25%;
}

Syntax

<angle-percentage> = <angle> | <percentage>  

Values

  • <angle>Refer to <angle> for possible values
  • <percentage>Refer to <percentage> for possible values

Example

<div class='container'>
<h1>CSS &lt;angle-percentage&gt; example</h1>
<p class='intro'>This demo uses a conic-gradient where color stops are specified with degrees and percentages.</p>
<div class='wheel' aria-hidden='true'></div>
<pre class='snippet'>background: conic-gradient(from 45deg at 50% 50%, red 0deg 25%, orange 25% 50%, yellow 50% 75%, green 75% 100%);</pre>
</div>
:root {
  --size: 260px;
  --bg: #f6f7fb;
  --card: #ffffff;
  --muted: #6b7280;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 20px;
  padding: 24px;
}

.container {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(11, 14, 22, 0.08);
  padding: 28px;
  max-width: 850px;
  width: 100%;
  text-align: center;
}

.wheel {
  width: var(--size);
  height: var(--size);
  margin: 18px auto;
  border-radius: 50%;
  background: conic-gradient(from 45deg at 50% 50%,
    red 0deg 25%,
    orange 25% 50%,
    yellow 50% 75%,
    green 75% 100%);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.06);
}

.snippet {
  background: #0f172a;
  color: #e6eef8;
  padding: 10px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
  overflow-x: auto;
}

h1 { margin: 0; font-size: 18px; }
.intro { color: var(--muted); margin: 10px 0 0 0; font-size: 13px; }
Open in editor

Browser Support

The following information will show you the current browser support for the CSS angle-percentage data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.

This data type is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.