Skip to content

Commit 3ffc6a4

Browse files
committed
fixed output for new syntax
1 parent 656eacd commit 3ffc6a4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

org/w3c/css/values/HWB.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void normalize() {
9191
w = pw.getValue();
9292
b = pb.getValue();
9393
s = w.add(b);
94-
if (s.compareTo(s100) != 0) {
94+
if (s.compareTo(s100) > 0) {
9595
w = w.multiply(s100).divide(s, 3, BigDecimal.ROUND_HALF_UP).stripTrailingZeros();
9696
b = b.multiply(s100).divide(s, 3, BigDecimal.ROUND_HALF_UP).stripTrailingZeros();
9797
pw.setValue(w);
@@ -107,8 +107,8 @@ public String toString() {
107107
if (output == null) {
108108
normalize();
109109
StringBuilder sb = new StringBuilder("hwb(");
110-
sb.append(vh).append(", ");
111-
sb.append(vw).append(", ");
110+
sb.append(vh).append(' ');
111+
sb.append(vw).append(' ');
112112
sb.append(vb);
113113
if (!faSet) {
114114
sb.append(')');

0 commit comments

Comments
 (0)