Skip to content

Conversation

martin-jackson
Copy link

After this change, all values currently listed on MDN for text-align are allowed: https://developer.mozilla.org/en-US/docs/Web/CSS/text-align#values

left and right are not in textAlignLiterals0, but they are already included through azimuthLiterals1:

Set<String> azimuthLiterals1 = j8().setOf("left", "right");

Property textAlign = new Property(
0, union(azimuthLiterals1, textAlignLiterals0), zeroFns);
builder.put("text-align", textAlign);

Copy link

@eivinhb eivinhb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@martin-jackson
Copy link
Author

@mikesamuel Hi! Does this look ok to merge and release? We need to allow the missing values, and I haven't found a way to override the existing text-align rule. The union() method of CssSchema throws an exception when trying to combine the default schema with my own schema:

var updatedTextAlign = Map.of("text-align", new CssSchema.Property(0, Set.of("center", "end", "inherit", "justify", "justify-all", "match-parent", "start", "left", "right"), Collections.emptyMap())); var schema = CssSchema.union( CssSchema.DEFAULT, CssSchema.withProperties(updatedTextAlign) );

if (oldProp != null && !oldProp.equals(newProp)) {
throw new IllegalArgumentException(
"Duplicate irreconcilable definitions for " + name);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants