# Technical Limitations and Disallowed Features for SVGs in PPT Master

> Discover SVG limitations in PPT Master. Learn what elements like masks, CSS, animations, and scripts are rejected during conversion to PowerPoint DrawingML.

- Repository: [HugoHe/ppt-master](https://github.com/hugohe3/ppt-master)
- Tags: getting-started
- Published: 2026-04-24

---

**PPT Master rejects SVG elements including masks, CSS styles, animations, and scripts during conversion to PowerPoint DrawingML, while permitting only specific geometric constructs and conditional features like simple markers and single-shape clipPaths defined in `<defs>`.**

PPT Master, an open-source project maintained in the `hugohe3/ppt-master` repository, converts SVG graphics into native PowerPoint DrawingML formats. To ensure reliable conversion and full compatibility with Microsoft PowerPoint, the engine enforces strict **technical limitations and disallowed features** during the SVG-to-PPT conversion stage defined in the project’s documentation.

## Banned SVG Elements and Attributes

PPT Master maintains an explicit whitelist approach that blocks features lacking PowerPoint equivalents or those that break deterministic conversion. According to the **SVG Technical Constraints** documented in [`AGENTS.md`](https://github.com/hugohe3/ppt-master/blob/main/AGENTS.md), the following elements and attributes are rejected outright:

- **`<mask>`** — DrawingML lacks native mask support, making transparency masks impossible to translate.
- **`<style>` or `class` attributes** — External CSS cannot be resolved during the conversion process, causing unpredictable styling.
- **`<foreignObject>`** — Embeds HTML or XML content that has no representation in PowerPoint's object model.
- **`<textPath>`** — Text layout along arbitrary paths is unsupported by PowerPoint's text engine.
- **`@font-face`** — Custom fonts cannot be automatically embedded into generated presentations.
- **`<animate*>` tags** — All SVG animation elements are prohibited since PowerPoint does not support frame-based SVG animation.
- **`<script>`** — Executable JavaScript is unsafe and cannot be translated into PowerPoint's macro or action model.
- **`<iframe>`** — External document embedding violates the self-contained file requirement.
- **`<symbol>` with `<use>`** — Symbol reuse patterns (except direct `<defs>` `id` references) cannot be mapped reliably to DrawingML's geometry model.

The following SVG demonstrates disallowed features that [`finalize_svg.py`](https://github.com/hugohe3/ppt-master/blob/main/finalize_svg.py) will reject or strip:

```xml
<svg xmlns="http://www.w3.org/2000/svg">
  <style>.masked { fill: red; }</style>
  <mask id="m">
    <rect width="100%" height="100%" fill="white"/>
    <circle cx="50" cy="50" r="30" fill="black"/>
  </mask>
  <rect width="200" height="200" fill="blue" mask="url(#m)" class="masked"/>
</svg>

```

Both `<mask>` and `<style>`/`class` are prohibited; PPT Master will reject this SVG or strip the masked portion, resulting in a plain blue rectangle.

## Conditionally Allowed SVG Features

Two specific SVG capabilities are permitted only when they satisfy strict structural requirements defined in [`shared-standards.md`](https://github.com/hugohe3/ppt-master/blob/main/shared-standards.md) and enforced by [`finalize_svg.py`](https://github.com/hugohe3/ppt-master/blob/main/finalize_svg.py).

### Arrow Markers (marker-start and marker-end)

Line endpoints using **`marker-start`** or **`marker-end`** are allowed only when:

- The `<marker>` element resides inside `<defs>`
- The marker uses `orient="auto"`
- The marker shape is limited to simple triangles, diamonds, or circles/ellipses

When these conditions are met, PPT Master maps the markers to native DrawingML elements `<a:headEnd>` and `<a:tailEnd>`.

```xml
<svg xmlns="http://www.w3.org/2000/svg">
  <defs>
    <marker id="arrow" viewBox="0 0 10 10" refX="0" refY="5"
            markerWidth="6" markerHeight="6" orient="auto">
      <polygon points="0,0 10,5 0,10" fill="black"/>
    </marker>
  </defs>
  <path d="M20 20 L200 200" stroke="black" marker-end="url(#arrow)"/>
</svg>

```

The marker uses a simple triangle inside `<defs>` with `orient="auto"`, satisfying the conditional allowance; PPT Master maps it to a native line head end.

### Image Clipping Paths

The **`clipPath`** attribute on `<image>` elements is accepted only when:

- The `<clipPath>` is defined inside `<defs>`
- It contains exactly one child shape (circle, ellipse, rect with `rx`/`ry`, path, or polygon)

Valid clipPaths convert to DrawingML picture geometry using `<a:prstGeom>` or `<a:custGeom>` elements.

```xml
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <clipPath id="clip">
      <circle cx="200" cy="200" r="150"/>
    </clipPath>
  </defs>
  <image href="photo.png" x="50" y="50" width="400" height="300"
         clip-path="url(#clip)"/>
  <rect x="600" y="100" width="300" height="200"
        fill="#4A90E2" fill-opacity="0.7"/>
</svg>

```

The `<clipPath>` obeys the "single shape inside `<defs>`" rule, so PPT Master will convert it to a native picture geometry.

## Fully Supported SVG Core Constructs

All basic SVG elements translate directly to PowerPoint shapes without restriction:

- Simple geometric shapes: `<rect>`, `<circle>`, `<ellipse>`, `<line>`, `<polyline>`, `<polygon>`, and `<path>`
- **`<image>`** elements (with optional supported clipPath)
- Grouping via **`<g>`** (note: opacity must be applied per child, not on the group)
- Fill and stroke opacity via **`fill-opacity`** and **`stroke-opacity`** attributes

## Workarounds for Prohibited Features

When your source SVG uses banned features, apply these documented alternatives from [`AGENTS.md`](https://github.com/hugohe3/ppt-master/blob/main/AGENTS.md):

| Banned Construct | Allowed Alternative |
|------------------|---------------------|
| `rgba()` colors | Use separate `fill-opacity` or `stroke-opacity` attributes combined with solid RGB colors |
| `<g opacity="…">` | Apply the same opacity value to each child element individually |
| `<image opacity="…">` | Overlay the image with a solid-color mask layer to simulate translucency |

## Key Implementation Files

The SVG constraints are defined, documented, and enforced across four key files in the `hugohe3/ppt-master` repository:

- **[`AGENTS.md`](https://github.com/hugohe3/ppt-master/blob/main/AGENTS.md)** — Central documentation outlining SVG technical constraints and banned features.
- **[`skills/ppt-master/references/shared-standards.md`](https://github.com/hugohe3/ppt-master/blob/main/skills/ppt-master/references/shared-standards.md)** — Detailed specifications for conditional features including marker geometry requirements and clipPath constraints.
- **[`skills/ppt-master/scripts/finalize_svg.py`](https://github.com/hugohe3/ppt-master/blob/main/skills/ppt-master/scripts/finalize_svg.py)** — Implements the validation pipeline that checks SVGs against the whitelist before conversion.
- **[`skills/ppt-master/scripts/svg_to_pptx.py`](https://github.com/hugohe3/ppt-master/blob/main/skills/ppt-master/scripts/svg_to_pptx.py)** — Performs the actual translation of validated SVG constructs into native PowerPoint DrawingML.

## Summary

- PPT Master converts SVG to PowerPoint DrawingML using a strict whitelist approach that rejects masks, CSS styles, animations, scripts, and external references.
- Only **marker-end/marker-start** and **clipPath** are conditionally allowed when placed in `<defs>` with specific geometric constraints.
- Basic shapes, groups (without group-level opacity), and explicit opacity attributes are fully supported.
- Use `fill-opacity` instead of `rgba()` and apply opacity per-element rather than on `<g>` containers to ensure compatibility.
- Validation occurs in [`finalize_svg.py`](https://github.com/hugohe3/ppt-master/blob/main/finalize_svg.py) while conversion logic resides in [`svg_to_pptx.py`](https://github.com/hugohe3/ppt-master/blob/main/svg_to_pptx.py).

## Frequently Asked Questions

### Why does PPT Master reject SVG masks?

PPT Master rejects **`<mask>`** elements because PowerPoint's DrawingML format has no native support for transparency masks or alpha channel masking. Without a corresponding PowerPoint construct, the conversion engine cannot deterministically translate the visual effect, so it strips these elements to prevent rendering errors.

### Can I use CSS classes in my SVG files for PPT Master?

No. **`<style>`** blocks and **`class`** attributes are explicitly disallowed because [`finalize_svg.py`](https://github.com/hugohe3/ppt-master/blob/main/finalize_svg.py) cannot resolve external CSS during the conversion process. All styling must be applied via inline attributes such as `fill`, `stroke`, `fill-opacity`, and `stroke-opacity` directly on SVG elements.

### How do I convert rgba() colors for PPT Master compatibility?

Replace CSS `rgba()` declarations with separate RGB color values and opacity attributes. For example, instead of `fill="rgba(74,144,226,0.7)"`, use `fill="#4A90E2" fill-opacity="0.7"`. This separation is required because the converter processes color and opacity as distinct DrawingML properties.

### What happens if I include a banned feature like `<script>` or `<animate>`?

The [`finalize_svg.py`](https://github.com/hugohe3/ppt-master/blob/main/finalize_svg.py) validation script will either reject the SVG file entirely or strip the prohibited elements during preprocessing. Features like **`<script>`** (JavaScript) and **`<animate>`** tags are removed because PowerPoint cannot execute JavaScript or render SVG-native animations, ensuring the output presentation contains only static, compatible DrawingML.