Spec-Zone.ru › CSS

`-webkit-mask-repeat-y` CSS property

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The -webkit-mask-repeat-y property sets whether and how a mask image is repeated (tiled) vertically.

Syntax

/* Keyword values */
-webkit-mask-repeat-y: repeat;
-webkit-mask-repeat-y: no-repeat;
-webkit-mask-repeat-y: space;
-webkit-mask-repeat-y: round;

/* Multiple values */
-webkit-mask-repeat-y: repeat, no-repeat, space;

/* Global values */
-webkit-mask-repeat-y: inherit;
-webkit-mask-repeat-y: initial;
-webkit-mask-repeat-y: revert;
-webkit-mask-repeat-y: revert-layer;
-webkit-mask-repeat-y: unset;

Values

This property is specified as one or more comma-separated values:

repeat
The mask image is repeated vertically.
no-repeat
The mask image is not repeated vertically; only one copy of the mask image is drawn in that direction. The vertical remainder of the masked element's content is not displayed.
space
The image is repeated as much as possible without clipping. The first and last images are pinned to the top and bottom edge of the element, and whitespace is distributed evenly between the images. The mask-position property is ignored unless only one image can be displayed without clipping. The only case where clipping happens using space is when there isn't enough room to display one image.
round
As the allowed vertical space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added. When the next image is added, all of the current ones compress to allow room. Example: An image with an original height of 260px, repeated three times, might stretch until each repetition is 300px high, and then another image will be added. They will then compress to a height of 225px.

Formal definition

Initial value repeat
Applies to all elements
Inherited no
Computed value for <length> the absolute value, otherwise a percentage
Animation type discrete

Formal syntax

-webkit-mask-repeat-y = [ repeat | no-repeat | space | round ]#

Examples

Using a repeating or non-repeating mask image

.example-one {
  -webkit-mask-image: url("mask.png");
  -webkit-mask-repeat-y: repeat;
}

.example-two {
  -webkit-mask-image: url("mask.png");
  -webkit-mask-repeat-y: no-repeat;
}

Using multiple mask images

You can specify a different <repeat-style> for each mask image, separated by commas:

.example-three {
  -webkit-mask-image: url("mask1.png"), url("mask2.png");
  -webkit-mask-repeat-y: repeat, space;
}

Each image is matched with the corresponding repeat style, from first specified to last.

Specifications

Not part of any standard.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on iOS Samsung Internet WebView Android WebView on iOS
-webkit-mask-repeat-y
3–120
79–120
No
15–106
5–15
18–120
No
14–80
5–15
1.0–25.0
4.4–120
5–15

See also

  • -webkit-mask-repeat
  • -webkit-mask-repeat-x

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/-webkit-mask-repeat-y

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API