Skip to content

Commit 4e4367f

Browse files
committed
Add 'space' value to border-image-repeat, since we have use cases for it now (fancy dotted-type borders, etc.)
1 parent d8adb44 commit 4e4367f

2 files changed

Lines changed: 62 additions & 35 deletions

File tree

css3-background/Overview.html

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,9 @@ <h3 id=the-background-repeat><span class=secno>3.4 </span>The &lsquo;<code
739739
<p><img alt="Image of an element with a dotted background" src=bg-space>
740740

741741
<p class=caption>The effect of &lsquo;<code class=property><a
742-
href="#space">space</a></code>&rsquo;: the image of a dot is tiled to
743-
cover the whole background and the images are equally spaced.
742+
href="#border-image-space">space</a></code>&rsquo;: the image of a dot
743+
is tiled to cover the whole background and the images are equally
744+
spaced.
744745
</div>
745746
</div>
746747

@@ -3155,6 +3156,12 @@ <h3 id=the-border-image-repeat><span class=secno>5.5 </span>The
31553156
<dd>The image is tiled (repeated) to fill the area. If it does not fill
31563157
the area with a whole number of tiles, the image is rescaled so that it
31573158
does.
3159+
3160+
<dt><dfn id=border-image-space>space</dfn>
3161+
3162+
<dd>The image is tiled (repeated) to fill the area. If it does not fill
3163+
the area with a whole number of tiles, the extra space is distributed
3164+
around the tiles.
31583165
</dl>
31593166

31603167
<p>The exact process for scaling and tiling the border-image parts is given
@@ -3218,43 +3225,53 @@ <h3 id=border-image-process><span class=secno>5.6 </span>Border-image
32183225
property.
32193226

32203227
<li>
3221-
<p>If the first keyword is &lsquo;<code class=property><a
3222-
href="#border-image-repeat">repeat</a></code>&rsquo;, the top, middle,
3223-
and bottom images are not changed any further.
3228+
<p>If the first keyword is &lsquo;<code class=css><a
3229+
href="#border-image-repeat">repeat</a></code>&rsquo; or &lsquo;<code
3230+
class=css><a href="#border-image-space">space</a></code>&rsquo;, the
3231+
top, middle, and bottom images are not changed any further.
32243232

32253233
<li>
32263234
<p>The effects of &lsquo;<code class=css><a
32273235
href="#border-image-stretch">stretch</a></code>&rsquo;, &lsquo;<code
3228-
class=css><a href="#border-image-round">round</a></code>&rsquo;, and
3236+
class=css><a href="#border-image-round">round</a></code>&rsquo;,
32293237
&lsquo;<code class=css><a
3230-
href="#border-image-repeat">repeat</a></code>&rsquo; for the second
3231-
keyword are analogous, acting on the height of the left, middle and
3232-
right images.
3238+
href="#border-image-repeat">repeat</a></code>&rsquo;, and &lsquo;<code
3239+
class=css><a href="#border-image-space">space</a></code>&rsquo; for
3240+
the second keyword are analogous, acting on the height of the left,
3241+
middle and right images.
32333242
</ul>
32343243

32353244
<li>Position the first tile.
32363245
<ul>
32373246
<li>
32383247
<p>If the first keyword is &lsquo;<code class=css><a
3239-
href="#border-image-round">round</a></code>&rsquo;, the top, middle,
3240-
and bottom images are placed at the left edge of their respective
3241-
parts of the border-image area. Otherwise the images are centered
3242-
horizontally in their respective areas.
3248+
href="#border-image-repeat">repeat</a></code>&rsquo;, the top, middle,
3249+
and bottom images are centered horizontally in their respective areas.
3250+
Otherwise the images are placed at the left edge of their respective
3251+
parts of the border-image area.
32433252

32443253
<li>
3245-
<p>If the second keyword is &lsquo;<code class=css><a
3246-
href="#border-image-round">round</a></code>&rsquo;, the left, middle,
3247-
and right images are placed at the top edge of their respective parts
3248-
of the border-image area. Otherwise the images are centered vertically
3249-
in their respective areas.
3254+
<p>If the first keyword is &lsquo;<code class=css><a
3255+
href="#border-image-repeat">repeat</a></code>&rsquo;, the left,
3256+
middle, and right images are centered vertically in their respective
3257+
areas. Otherwise the images are placed at the top edge of their
3258+
respective parts of the border-image area.
32503259
</ul>
32513260

32523261
<li>Tile and draw.
32533262
<ul>
32543263
<li>
3255-
<p>The images are then tiled within their respective areas. All images
3264+
<p>The images are then tiled to fill their respective areas. All images
32563265
are drawn at the same stacking level as normal borders: immediately in
32573266
front of the background layers.
3267+
3268+
<li>
3269+
<p>In the case of &lsquo;<code class=css><a
3270+
href="#border-image-space">space</a></code>&rsquo;, any partial tiles
3271+
are discarded and the extra space distributed before, after, and
3272+
between the tiles. (I.e. the gap before the first tile, the gap after
3273+
the last tile, and the gaps between tiles are equalized.) <span
3274+
class=note>This can result in empty border-image side areas.</span>
32583275
</ul>
32593276
</ol>
32603277

@@ -4891,8 +4908,10 @@ <h2 class=no-num id=index>Index</h2>
48914908

48924909
<li>solid, <a href="#solid" title=solid><strong>4.2</strong></a>
48934910

4894-
<li>space, <a href="#space" title=space><strong>3.4</strong></a>, <a
4895-
href="#space-space" title=space><strong>3.4</strong></a>
4911+
<li>space, <a href="#border-image-space"
4912+
title=space><strong>5.5</strong></a>, <a href="#space"
4913+
title=space><strong>3.4</strong></a>, <a href="#space-space"
4914+
title=space><strong>3.4</strong></a>
48964915

48974916
<li>stretch, <a href="#border-image-stretch"
48984917
title=stretch><strong>5.5</strong></a>

css3-background/Overview.src.html

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,10 @@ <h3 id="the-border-image-repeat">The 'border-image-repeat' property</h3>
23052305
<dd>The image is tiled (repeated) to fill the area. If it does not
23062306
fill the area with a whole number of tiles, the image is rescaled
23072307
so that it does.
2308+
<dt><dfn id="border-image-space">space</dfn></dt>
2309+
<dd>The image is tiled (repeated) to fill the area. If it does not
2310+
fill the area with a whole number of tiles, the extra space is
2311+
distributed around the tiles.
23082312
</dl>
23092313

23102314
<p>The exact process for scaling and tiling the border-image parts is
@@ -2351,32 +2355,36 @@ <h3 id="border-image-process">Border-image drawing process</h3>
23512355
fit in the middle part of the border-image area, exactly as for
23522356
''round'' in the 'background-repeat' property.
23532357

2354-
<li><p>If the first keyword is 'repeat', the top, middle, and bottom
2355-
images are not changed any further.
2356-
2358+
<li><p>If the first keyword is ''repeat'' or ''space'', the top, middle,
2359+
and bottom images are not changed any further.
23572360

2358-
<li><p>The effects of ''stretch'', ''round'', and ''repeat'' for the
2359-
second keyword are analogous, acting on the height of the left,
2361+
<li><p>The effects of ''stretch'', ''round'', ''repeat'', and ''space''
2362+
for the second keyword are analogous, acting on the height of the left,
23602363
middle and right images.
23612364
</ul>
23622365

23632366
<li>Position the first tile.
23642367
<ul>
2365-
<li><p>If the first keyword is ''round'', the top, middle, and bottom
2366-
images are placed at the left edge of their respective parts of the
2367-
border-image area. Otherwise the images are centered horizontally
2368-
in their respective areas.
2369-
<li><p>If the second keyword is ''round'', the left, middle, and right
2370-
images are placed at the top edge of their respective parts of the
2371-
border-image area. Otherwise the images are centered vertically in
2372-
their respective areas.
2368+
<li><p>If the first keyword is ''repeat'', the top, middle, and bottom
2369+
images are centered horizontally in their respective areas. Otherwise
2370+
the images are placed at the left edge of their respective parts
2371+
of the border-image area.
2372+
<li><p>If the first keyword is ''repeat'', the left, middle, and right
2373+
images are centered vertically in their respective areas. Otherwise
2374+
the images are placed at the top edge of their respective parts
2375+
of the border-image area.
23732376
</ul>
23742377

23752378
<li>Tile and draw.
23762379
<ul>
2377-
<li><p>The images are then tiled within their respective areas. All
2380+
<li><p>The images are then tiled to fill their respective areas. All
23782381
images are drawn at the same stacking level as normal borders:
23792382
immediately in front of the background layers.
2383+
<li><p>In the case of ''space'', any partial tiles are discarded and
2384+
the extra space distributed before, after, and between the tiles.
2385+
(I.e. the gap before the first tile, the gap after the last tile,
2386+
and the gaps between tiles are equalized.)
2387+
<span class="note">This can result in empty border-image side areas.</span>
23802388
</ul>
23812389
</ol>
23822390

0 commit comments

Comments
 (0)