# Features
Below is a list of all the supported CSS properties and values.
> **CSS filters and layer opacity:** the surface-compositing path applies the full standard filter function set (via the native canvas backend) to an eligible layer's complete subtree before layer `opacity` is composited once; the SVG fallback only expresses blur + a single drop-shadow. See [CSS filters and layer opacity](./filter-support.md) for the support matrix, subtree restrictions, and fallback behavior.
- accent-color (**Checkbox/radio fill** — checked state of `` elements; `auto` falls back to the built-in colour)
- background
- background-clip (incl. `text`)
- background-blend-mode
- background-color
- background-image
- url()
- linear-gradient()
- repeating-linear-gradient()
- radial-gradient()
- repeating-radial-gradient()
- conic-gradient()
- repeating-conic-gradient()
- background-origin
- background-position
- background-repeat
- background-size
- border
- border-color
- border-image
- border-image-source
- border-image-slice
- border-image-width
- border-image-outset
- border-image-repeat
- border-radius
- border-style
- border-width
- backdrop-filter (**Blurs the already-painted backdrop** — same filter chains as the filter surface path; see [Backdrop filters](#backdrop-filter-support))
- bottom
- box-decoration-break (**Parsed only** — no visual effect in single-element rendering)
- box-shadow
- box-sizing
- clip-path
- `inset()`
- `rect()`
- `xywh()`
- `circle()`
- `ellipse()`
- `polygon()`
- `path()`
- content
- counter-increment
- counter-reset
- color
- direction
- display
- filter ([surface-compositing scope and fallback behavior](./filter-support.md))
- blur()
- brightness()
- contrast()
- drop-shadow()
- grayscale()
- hue-rotate()
- invert()
- opacity()
- saturate()
- sepia()
- flex
- float
- font
- font-family
- font-size
- font-style
- font-variant
- font-variant-ligatures (**Parsed only** — Canvas renders via browser font engine)
- font-weight
- height
- image-rendering (`auto`, `pixelated`, `crisp-edges`, `smooth`)
- image-set() (**background-image value** — candidate closest to `devicePixelRatio` is selected)
- isolation (**Stacking-context flag** — blended descendants are structurally scoped; pixel-level group isolation is not composited separately)
- left
- letter-spacing
- line-break
- line-height
- list-style
- list-style-image
- list-style-position
- list-style-type
- margin
- mask-image / mask-position / mask-repeat / mask-size (**Alpha masks** — see [Mask support](#mask-support))
- mix-blend-mode
- max-height
- max-width
- min-height
- min-width
- object-fit
- object-position
- opacity
- overflow
- overflow-wrap
- outline / outline-offset / outline-color / outline-style / outline-width
- padding
- paint-order
- position
- quotes
- right
- rotate (**Limited support**)
- text-align
- text-decoration
- text-decoration-color
- text-decoration-line
- text-decoration-style (`solid`, `double`, `dotted`, `dashed`, `wavy`)
- text-decoration-thickness
- text-underline-offset
- text-emphasis / text-emphasis-style / text-emphasis-color / text-emphasis-position (**Horizontal text**; see [Text emphasis](#text-emphasis-support))
- text-overflow
- text-shadow
- text-transform
- top
- transform (**Limited support**)
- transform-origin
- visibility
- white-space
- width
- webkit-line-clamp
- webkit-box-reflect (**Non-standard** — see [Box reflection](#-webkit-box-reflect-support))
- webkit-text-fill-color (**Fill override** — falls back to `color` for `currentcolor`)
- webkit-text-stroke
- word-break
- word-spacing
- word-wrap
- writing-mode
- z-index
- zoom
## What's new in v2.5
- **Full standard filter chains** (v2.5.2) — any order and count of `blur()`, `brightness()`, `contrast()`, `grayscale()`, `hue-rotate()`, `invert()`, `opacity()`, `saturate()`, `sepia()` and `drop-shadow()` composited on the filter surface; `backdrop-filter` follows the same chain support (see [CSS filters and layer opacity](./filter-support.md))
- **`background-clip: text`** — gradient (and colour) backgrounds clipped to the glyphs, rendered on a device-pixel surface with text-shadow and `-webkit-text-stroke` interaction (see [background-clip: text support](#background-clip-text-support))
- **`mask-image` support** — alpha masks with `mask-position` / `mask-size` / `mask-repeat`, composited on a dedicated surface (see [Mask support](#mask-support))
- **`backdrop-filter`** — frosted-glass captures via backdrop capture and the filter surface pipeline (see [Backdrop-filter support](#backdrop-filter-support))
- **`conic-gradient()`, `repeating-radial-gradient()` and `repeating-conic-gradient()`** — completing the gradient family
- **`clip-path: rect()` / `xywh()`** — the newer basic shape functions
- **`text-emphasis`** — CJK emphasis marks (`filled`/`open` dot, circle, double-circle, triangle, sesame, or a custom string) in any colour, above or below the text
- **`-webkit-box-reflect`** — mirrored copies below/above/left/right with offset and gradient mask
- **`image-set()`** — the DPR-appropriate candidate is selected from the computed value
- **`border-image-width` / `border-image-outset`** — the border-image geometry family is complete
## What's new in v2.4.x
- **`accent-color`, `outline`, `-webkit-text-fill-color`, `isolation`** — form control colours, focus rings, gradient-text fill overrides, blend scoping
- **box-shadow fidelity** — correct blur/border-radius scaling, inset shadow masking, and shadows preserved through transformed ancestors ([2.4.4](https://github.com/yorickshan/html2canvas-pro/blob/main/CHANGELOG.md), [2.4.5](https://github.com/yorickshan/html2canvas-pro/blob/main/CHANGELOG.md))
- **filter surface compositing** — eligible layers composite `blur()`/`drop-shadow()` on a dedicated surface before layer `opacity` is applied; native canvas fast path with verified SVG fallback ([scope & limits](./filter-support.md))
- **CJK text** — CJK glyphs keep the alphabetic baseline when `letter-spacing` is set
- **textarea text wrapping** — `white-space` aware wrapping inside textareas
- **Cross-origin images** — the resource cache can load cross-origin images with CORS enabled
- **Shadow DOM** — shadow roots and attributes of custom elements are preserved in clones; fieldset legends are positioned like the browser does
## CSS properties supported as of v2.1.1+
All previously listed unsupported properties are now implemented:
- **background-blend-mode** — Full support for blend modes on background image layers
- **border-image** — 9-slice border image rendering with stretch/repeat/round
- **box-decoration-break** — Parsed (`slice` / `clone`); no visual difference in single-element rendering
- **box-shadow** — Full support including inset shadows
- **filter** — CSS filter functions: `blur()`, `brightness()`, `contrast()`, `drop-shadow()`, `grayscale()`, `hue-rotate()`, `invert()`, `opacity()`, `saturate()`, `sepia()`. Eligible layers composite full ordered chains of these functions on a dedicated surface before layer `opacity` (see [filter support](./filter-support.md) for eligibility and the SVG fallback subset).
- **font-variant-ligatures** — Parsed; Canvas text rendering is handled by the browser font engine
- **object-position** — Controls alignment of replaced elements (images, canvas, SVG) within their content box
- **repeating-linear-gradient()** — Repeating linear gradient backgrounds
- **zoom** — Element zoom via CSS transform scale
- **translate / scale / rotate** — CSS Transforms Level 2 individual transform properties, composed with `transform` in spec order (translate → rotate → scale → transform) around the shared `transform-origin`
- **color-mix()** — Interpolation in `srgb`, `srgb-linear`, `lab`, `oklab`, `lch`, `oklch`, `hsl`, `xyz`, `xyz-d50`, `xyz-d65` with alpha premultiplication and named hue methods; unsupported forms degrade to transparent. Modern browsers hand html2canvas-pro the already-resolved `color()`/`lab()`/`oklab()` computed value, so captures work there even without this parser
## Known unsupported CSS features
Some properties are parsed (so they appear in the supported list) but have no
rendering effect, and others are not supported at all. This section keeps the
honest boundary visible:
- **`background-attachment: fixed` / `local`** — not parsed; backgrounds render
as if `scroll`.
- **3D transforms** — `perspective()`, the `perspective` property and
`transform-style: preserve-3d` are not implemented; `matrix3d()` is projected
onto its 2D components (the z axis is dropped).
- **`mask-mode: luminance`**, **`mask-composite`**, **`mask-clip` /
`mask-origin`** — alpha masking with the spec-default additive compositing
only (see [Mask support](#mask-support)).
- **`line-break`** — parsed but not applied; line segmentation uses
`Intl.Segmenter` defaults.
- **`box-decoration-break: clone`** — parsed; the clone/slice painting
difference is not rendered.
- **`font-variant-ligatures`** and other OpenType feature selectors — parsed;
the Canvas 2D font engine cannot select font features (only `small-caps`
via `font-variant`).
- **`::first-line`, `::first-letter`, `::selection`** — pseudo-element styling
beyond `::before` / `::after` is not captured.
## Additional Features
### Image Smoothing Control
Control image smoothing (anti-aliasing) for rendered images. Perfect for pixel art, retro games, and low-resolution image upscaling.
**Global Options:**
```javascript
// Disable smoothing for pixel art
html2canvas(element, {
imageSmoothing: false,
scale: 2 // Upscale 2x without blur
});
// High quality smoothing for photos
html2canvas(element, {
imageSmoothing: true,
imageSmoothingQuality: 'high' // 'low' | 'medium' | 'high'
});
```
**CSS Property Support:**
```html
```
**Supported CSS values:**
- `auto` - Browser default behavior
- `pixelated` - Disable smoothing, preserve pixel art style (also `-webkit-optimize-contrast`)
- `crisp-edges` - Disable smoothing, preserve sharp edges (also `-webkit-crisp-edges`, `-moz-crisp-edges`)
- `smooth` - Enable high-quality smoothing
**Common Use Cases:**
1. **Pixel Art / Retro Games**
```javascript
// Capture pixel-perfect game screenshot without blur
const gameCanvas = document.getElementById('game');
const screenshot = await html2canvas(gameCanvas, {
imageSmoothing: false,
scale: 2, // Upscale 2x without blur
backgroundColor: '#000000'
});
document.body.appendChild(screenshot);
```
2. **UI Icons and Sprites**
```javascript
// Export crisp 16x16 icons at 4x scale for retina displays
const iconElement = document.querySelector('.icon-16');
const exportedIcon = await html2canvas(iconElement, {
imageSmoothing: false,
scale: 4,
backgroundColor: null // Transparent background
});
```
3. **Mixed Content (Pixel Art + Photos)**
```html
这些文字会带红色圆点
強調テキスト
Starred text
``` Supported shapes: `dot`, `circle`, `double-circle`, `triangle`, `sesame`, each in `filled` (default) or `open` form, plus a custom `