8000 [css-shapes] one more serialization tweak · w3c/csswg-drafts@d476d71 · GitHub
Skip to content

Commit d476d71

Browse files
committed
[css-shapes] one more serialization tweak
1 parent 151c013 commit d476d71

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

css-shapes/Overview.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ <h3 class="heading settled heading" data-level=3.3 id=basic-shape-serialization>
611611

612612
<p> The <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a> values in <a class=css data-link-type=maybe href=#funcdef-ellipse title=ellipse()>ellipse()</a> and <a class=css data-link-type=maybe href=#funcdef-circle title=circle()>circle()</a>
613613
serialize to their 2- and 4-value forms only,
614-
normalized to their computed values (as above),
615614
preferring the 2-value form
616615
when it can be expressed without calc(),
617616
preferring left and top origins,
@@ -620,7 +619,7 @@ <h3 class="heading settled heading" data-level=3.3 id=basic-shape-serialization>
620619
<div class=example>
621620

622621

623-
<p> Normalizing <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a> to its computed value (and omitting components such as zero length offsets) means that keywords without an offset turn into percentages.
622+
<p> Since <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a> keywords stand in for percentages, keywords without an offset turn into percentages.
624623

625624
<pre><code class=css>
626625
circle(at left bottom)
@@ -644,11 +643,11 @@ <h3 class="heading settled heading" data-level=3.3 id=basic-shape-serialization>
644643
<p> Avoiding calc() expressions means that some <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a> values that could be simplified to the 2-value form must be serialized in 4-value form instead.
645644

646645
<pre><code class=css>
647-
circle(at right 5% bottom 10px)
646+
circle(at right 5px bottom 10px)
648647

649-
serializes as "circle(at right 5% bottom 10px)"
648+
serializes as "circle(at right 5px bottom 10px)"
650649

651-
not as "circle(at 95% calc(100% - 10px))"
650+
not as "circle(at calc(100% - 5px) calc(100% - 10px))"
652651
</code></pre>
653652
<p> Avoiding calc() transformations means that if a specified (or computed) calc() must stay in calc() form, it will be used as-is, not reformulated with a different origin or reduced.
654653

css-shapes/Overview.src.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ <h3 id='basic-shape-serialization'>
487487

488488
The <<position>> values in ''ellipse()'' and ''circle()''
489489
serialize to their 2- and 4-value forms only,
490-
normalized to their computed values (as above),
491490
preferring the 2-value form
492491
when it can be expressed without calc(),
493492
preferring left and top origins,
@@ -496,7 +495,7 @@ <h3 id='basic-shape-serialization'>
496495
<div class="example">
497496

498497

499-
Normalizing <<position>> to its computed value (and omitting components such as zero length offsets) means that keywords without an offset turn into percentages.
498+
Since <<position>> keywords stand in for percentages, keywords without an offset turn into percentages.
500499

501500
<pre><code class="css">
502501
circle(at left bottom)
@@ -523,11 +522,11 @@ <h3 id='basic-shape-serialization'>
523522
Avoiding calc() expressions means that some <<position>> values that could be simplified to the 2-value form must be serialized in 4-value form instead.
524523

525524
<pre><code class="css">
526-
circle(at right 5% bottom 10px)
525+
circle(at right 5px bottom 10px)
527526

528-
serializes as "circle(at right 5% bottom 10px)"
527+
serializes as "circle(at right 5px bottom 10px)"
529528

530-
not as "circle(at 95% calc(100% - 10px))"
529+
not as "circle(at calc(100% - 5px) calc(100% - 10px))"
531530
</code></pre>
532531

533532
Avoiding calc() transformations means that if a specified (or computed) calc() must stay in calc() form, it will be used as-is, not reformulated with a different origin or reduced.

0 commit comments

Comments
 (0)