CSS - -webkit-mask-repeat-y

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



.exampleone {
  -webkit-mask-image: url('mask.png');
  -webkit-mask-repeat-y: repeat;

.exampletwo {
  -webkit-mask-image: url('mask.png');
  -webkit-mask-repeat-y: no-repeat;

Multiple mask image support

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

.examplethree {
  -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.


/* 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: unset;


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

Initial valuerepeat
Applies toall elements
Computed valueas specified
Canonical orderorder of appearance in the formal grammar of the values

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support No support[1] No support No support No support[1] ?
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

[1] While the property itself is recognized, it doesn't accept any values.

See Also  

-webkit-mask-repeat, -webkit-mask-repeat-x


The mask image is repeated vertically.
The mask image is not repeated vertically; only one copy of the mask image is drawn in vertical direction. The vertical remainder of the masked element's content is not displayed.
The mask image is repeated vertically.
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.
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 syntax

repeat <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> no-repeat <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> space <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> round


© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.

CSS CSS Masks CSS Property NeedsBrowserCompatibility NeedsMobileBrowserCompatibility Non-standard Reference