For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/mask-composite.md.
Lynx
  • English
  • mask-composite

    Introduction

    The mask-composite CSS property sets the compositing operation used on the current mask layer with the mask layers below it.

    Syntax

    mask-image: linear-gradient(#000, #000), linear-gradient(#000, transparent);
    mask-composite: exclude;

    Values

    • add
      Places the current mask layer over the mask layers below it.

    • subtract
      Subtracts the current mask layer from the mask layers below it.

    • intersect
      Keeps the overlapping area between the current mask layer and the mask layers below it.

    • exclude
      Keeps the areas that do not overlap between the current mask layer and the mask layers below it.

    Formal definition

    Initial valueadd
    Applies toview only
    Inheritedno
    Animatableno

    Formal syntax

    mask-composite = <compositing-operator>#
    
    <compositing-operator> =
      add        |
      subtract   |
      intersect  |
      exclude

    Differences from Web

    • Global values are not supported.

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.