Skip to content

text-4 updates #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
be17271
word-space-transform per https://www.w3.org/TR/2024/WD-css-text-4-202…
ylafon Mar 18, 2024
493dd9f
text-wrap-mode per https://www.w3.org/TR/2024/WD-css-text-4-20240219/…
ylafon Mar 19, 2024
34ae5fa
wrap-inside per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#pr…
ylafon Mar 19, 2024
8cd1f6b
wrap-after per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#pro…
ylafon Mar 19, 2024
50510fb
wrap-before per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#pr…
ylafon Mar 19, 2024
b88d8cb
text-wrap-style per https://www.w3.org/TR/2024/WD-css-text-4-20240219…
ylafon Mar 19, 2024
09d6670
fix copy/paste issue
ylafon Mar 19, 2024
55875a1
updated reference
ylafon Mar 19, 2024
4363bdc
text-wrap per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#prop…
ylafon Mar 19, 2024
ef6daa7
white-space-trim per https://www.w3.org/TR/2024/WD-css-text-4-2024021…
ylafon Mar 20, 2024
bc0b013
(c)
ylafon Mar 20, 2024
71a2e00
white-space-collapse per https://www.w3.org/TR/2024/WD-css-text-4-202…
ylafon Mar 20, 2024
eef81b2
white-space updated per https://www.w3.org/TR/2024/WD-css-text-4-2024…
ylafon Apr 7, 2024
43ea344
word-break per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#pro…
ylafon Apr 7, 2024
2932661
updated spec ref.
ylafon Apr 7, 2024
1b751a4
updated spec ref.
ylafon Apr 7, 2024
6ade4a6
hyphenate-character per https://www.w3.org/TR/2024/WD-css-text-4-2024…
ylafon Apr 7, 2024
53f265a
hyphenate-limit-zone per https://www.w3.org/TR/2024/WD-css-text-4-202…
ylafon Apr 7, 2024
e302a50
hyphenate-limit-chars per https://www.w3.org/TR/2024/WD-css-text-4-20…
ylafon Apr 7, 2024
f0b7056
hyphenate-limit-lines per https://www.w3.org/TR/2024/WD-css-text-4-20…
ylafon Apr 7, 2024
f7bf460
hyphenate-limit-last per https://www.w3.org/TR/2024/WD-css-text-4-202…
ylafon Apr 7, 2024
3b01237
fixed specref
ylafon Apr 7, 2024
1433c43
text-align updated per https://www.w3.org/TR/2024/WD-css-text-4-20240…
ylafon Apr 7, 2024
8ed3b8a
text-align-all updated per https://www.w3.org/TR/2024/WD-css-text-4-2…
ylafon Apr 7, 2024
485ed83
fixed specref
ylafon Apr 7, 2024
9430975
updated text-justify per https://www.w3.org/TR/2024/WD-css-text-4-202…
ylafon Apr 7, 2024
cd24dfc
text-group-align per https://www.w3.org/TR/2024/WD-css-text-4-2024021…
ylafon Apr 7, 2024
72e2459
fixed specref
ylafon Apr 8, 2024
99ade37
fixed specref
ylafon Apr 8, 2024
5ce8f4b
missed it in cd24dfcf8067dd5d7fdd9333fd09444c93add94a
ylafon Apr 8, 2024
032af0c
line-padding per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#p…
ylafon Apr 8, 2024
32c1b99
text-autospace per https://www.w3.org/TR/2024/WD-css-text-4-20240219/…
ylafon Apr 8, 2024
6d481ca
text-spacing-trim per https://www.w3.org/TR/2024/WD-css-text-4-202402…
ylafon Apr 8, 2024
e95180c
reverse the order as a value needs to be there before operator is set…
ylafon Apr 8, 2024
16eed8c
text-spacing per https://www.w3.org/TR/2024/WD-css-text-4-20240219/#p…
ylafon Apr 8, 2024
a1ee3a2
spec update
ylafon Apr 8, 2024
1f1786f
spec update
ylafon Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion org/w3c/css/properties/CSS3Properties.properties
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,19 @@ overflow-wrap: org.w3c.css.properties.css3.CssOverflowW
#alias per spec
word-wrap: org.w3c.css.properties.css3.CssOverflowWrap
word-break: org.w3c.css.properties.css3.CssWordBreak
hanging-punctuation: org.w3c.css.properties.css3.CssHangingPunctuation
hyphenate-character: org.w3c.css.properties.css3.CssHyphenateCharacter
hyphenate-limit-chars: org.w3c.css.properties.css3.CssHyphenateLimitChars
hyphenate-limit-last: org.w3c.css.properties.css3.CssHyphenateLimitLast
hyphenate-limit-lines: org.w3c.css.properties.css3.CssHyphenateLimitLines
hyphenate-limit-zone: org.w3c.css.properties.css3.CssHyphenateLimitZone
hyphens: org.w3c.css.properties.css3.CssHyphens
line-break: org.w3c.css.properties.css3.CssLineBreak
line-padding: org.w3c.css.properties.css3.CssLinePadding
text-align: org.w3c.css.properties.css3.CssTextAlign
text-align-all: org.w3c.css.properties.css3.CssTextAlignAll
text-align-last: org.w3c.css.properties.css3.CssTextAlignLast
text-autospace: org.w3c.css.properties.css3.CssTextAutospace
text-indent: org.w3c.css.properties.css3.CssTextIndent
text-justify: org.w3c.css.properties.css3.CssTextJustify
text-transform: org.w3c.css.properties.css3.CssTextTransform
Expand All @@ -217,15 +225,26 @@ text-emphasis: org.w3c.css.properties.css3.CssTextEmpha
text-emphasis-color: org.w3c.css.properties.css3.CssTextEmphasisColor
text-emphasis-position: org.w3c.css.properties.css3.CssTextEmphasisPosition
text-emphasis-style: org.w3c.css.properties.css3.CssTextEmphasisStyle
text-group-align: org.w3c.css.properties.css3.CssTextGroupAlign
text-size-adjust: org.w3c.css.properties.css3.CssTextSizeAdjust
text-spacing: org.w3c.css.properties.css3.CssTextSpacing
text-spacing-trim: org.w3c.css.properties.css3.CssTextSpacingTrim
text-underline-offset: org.w3c.css.properties.css3.CssTextUnderlineOffset
text-underline-position: org.w3c.css.properties.css3.CssTextUnderlinePosition
text-wrap: org.w3c.css.properties.css3.CssTextWrap
text-wrap-mode: org.w3c.css.properties.css3.CssTextWrapMode
text-wrap-style: org.w3c.css.properties.css3.CssTextWrapStyle
tab-size: org.w3c.css.properties.css3.CssTabSize
hanging-punctuation: org.w3c.css.properties.css3.CssHangingPunctuation
wrap-after: org.w3c.css.properties.css3.CssWrapAfter
wrap-before: org.w3c.css.properties.css3.CssWrapBefore
wrap-inside: org.w3c.css.properties.css3.CssWrapInside
white-space-collapse: org.w3c.css.properties.css3.CssWhiteSpaceCollapse
white-space-trim: org.w3c.css.properties.css3.CssWhiteSpaceTrim

text-combine-upright: org.w3c.css.properties.css3.CssTextCombineUpright
text-orientation: org.w3c.css.properties.css3.CssTextOrientation
glyph-orientation-vertical: org.w3c.css.properties.css3.CssGlyphOrientationVertical
word-space-transform: org.w3c.css.properties.css3.CssWordSpaceTransform


# marquee
Expand Down
112 changes: 112 additions & 0 deletions org/w3c/css/properties/css/CssHyphenateCharacter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
//
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2022.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css3.Css3Style;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;

/**
* @since CSS3
*/
public class CssHyphenateCharacter extends CssProperty {

/**
* Create a new CssHyphenateCharacter
*/
public CssHyphenateCharacter() {
}

/**
* Creates a new CssHyphenateCharacter
*
* @param expression The expression for this property
* @throws InvalidParamException Expressions are incorrect
*/
public CssHyphenateCharacter(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
throw new InvalidParamException("value",
expression.getValue().toString(),
getPropertyName(), ac);
}

public CssHyphenateCharacter(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}

/**
* Returns the value of this property
*/
public Object get() {
return value;
}


/**
* Returns the name of this property
*/
public final String getPropertyName() {
return "hyphenate-character";
}

/**
* Returns true if this property is "softly" inherited
* e.g. his value is equals to inherit
*/
public boolean isSoftlyInherited() {
return value.equals(inherit);
}

/**
* Returns a string representation of the object.
*/
public String toString() {
return value.toString();
}

/**
* Add this property to the CssStyle.
*
* @param style The CssStyle
*/
public void addToStyle(ApplContext ac, CssStyle style) {
Css3Style s = (Css3Style) style;
if (s.cssHyphenateCharacter != null) {
style.addRedefinitionWarning(ac, this);
}
s.cssHyphenateCharacter = this;
}


/**
* Compares two properties for equality.
*
* @param property The other property.
*/
public boolean equals(CssProperty property) {
return (property instanceof CssHyphenateCharacter &&
value.equals(((CssHyphenateCharacter) property).value));
}


/**
* Get this property in the style.
*
* @param style The style where the property is
* @param resolve if true, resolve the style to find this property
*/
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
if (resolve) {
return ((Css3Style) style).getHyphenateCharacter();
} else {
return ((Css3Style) style).cssHyphenateCharacter;
}
}
}

112 changes: 112 additions & 0 deletions org/w3c/css/properties/css/CssHyphenateLimitChars.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
//
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2022.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css3.Css3Style;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;

/**
* @since CSS3
*/
public class CssHyphenateLimitChars extends CssProperty {

/**
* Create a new CssHyphenateLimitChars
*/
public CssHyphenateLimitChars() {
}

/**
* Creates a new CssHyphenateLimitChars
*
* @param expression The expression for this property
* @throws InvalidParamException Expressions are incorrect
*/
public CssHyphenateLimitChars(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
throw new InvalidParamException("value",
expression.getValue().toString(),
getPropertyName(), ac);
}

public CssHyphenateLimitChars(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}

/**
* Returns the value of this property
*/
public Object get() {
return value;
}


/**
* Returns the name of this property
*/
public final String getPropertyName() {
return "hyphenate-limit-chars";
}

/**
* Returns true if this property is "softly" inherited
* e.g. his value is equals to inherit
*/
public boolean isSoftlyInherited() {
return value.equals(inherit);
}

/**
* Returns a string representation of the object.
*/
public String toString() {
return value.toString();
}

/**
* Add this property to the CssStyle.
*
* @param style The CssStyle
*/
public void addToStyle(ApplContext ac, CssStyle style) {
Css3Style s = (Css3Style) style;
if (s.cssHyphenateLimitChars != null) {
style.addRedefinitionWarning(ac, this);
}
s.cssHyphenateLimitChars = this;
}


/**
* Compares two properties for equality.
*
* @param property The other property.
*/
public boolean equals(CssProperty property) {
return (property instanceof CssHyphenateLimitChars &&
value.equals(((CssHyphenateLimitChars) property).value));
}


/**
* Get this property in the style.
*
* @param style The style where the property is
* @param resolve if true, resolve the style to find this property
*/
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
if (resolve) {
return ((Css3Style) style).getHyphenateLimitChars();
} else {
return ((Css3Style) style).cssHyphenateLimitChars;
}
}
}

112 changes: 112 additions & 0 deletions org/w3c/css/properties/css/CssHyphenateLimitLast.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
//
// Author: Yves Lafon <ylafon@w3.org>
//
// (c) COPYRIGHT MIT, ERCIM, Keio, Beihang, 2022.
// Please first read the full copyright statement in file COPYRIGHT.html
package org.w3c.css.properties.css;

import org.w3c.css.parser.CssStyle;
import org.w3c.css.properties.css3.Css3Style;
import org.w3c.css.util.ApplContext;
import org.w3c.css.util.InvalidParamException;
import org.w3c.css.values.CssExpression;

/**
* @since CSS3
*/
public class CssHyphenateLimitLast extends CssProperty {

/**
* Create a new CssHyphenateLimitLast
*/
public CssHyphenateLimitLast() {
}

/**
* Creates a new CssHyphenateLimitLast
*
* @param expression The expression for this property
* @throws InvalidParamException Expressions are incorrect
*/
public CssHyphenateLimitLast(ApplContext ac, CssExpression expression, boolean check)
throws InvalidParamException {
throw new InvalidParamException("value",
expression.getValue().toString(),
getPropertyName(), ac);
}

public CssHyphenateLimitLast(ApplContext ac, CssExpression expression)
throws InvalidParamException {
this(ac, expression, false);
}

/**
* Returns the value of this property
*/
public Object get() {
return value;
}


/**
* Returns the name of this property
*/
public final String getPropertyName() {
return "hyphenate-limit-last";
}

/**
* Returns true if this property is "softly" inherited
* e.g. his value is equals to inherit
*/
public boolean isSoftlyInherited() {
return value.equals(inherit);
}

/**
* Returns a string representation of the object.
*/
public String toString() {
return value.toString();
}

/**
* Add this property to the CssStyle.
*
* @param style The CssStyle
*/
public void addToStyle(ApplContext ac, CssStyle style) {
Css3Style s = (Css3Style) style;
if (s.cssHyphenateLimitLast != null) {
style.addRedefinitionWarning(ac, this);
}
s.cssHyphenateLimitLast = this;
}


/**
* Compares two properties for equality.
*
* @param property The other property.
*/
public boolean equals(CssProperty property) {
return (property instanceof CssHyphenateLimitLast &&
value.equals(((CssHyphenateLimitLast) property).value));
}


/**
* Get this property in the style.
*
* @param style The style where the property is
* @param resolve if true, resolve the style to find this property
*/
public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
if (resolve) {
return ((Css3Style) style).getHyphenateLimitLast();
} else {
return ((Css3Style) style).cssHyphenateLimitLast;
}
}
}

Loading