Skip to content

Commit 0f27a8d

Browse files
authored
Merge pull request #804 from CruGlobal/specTextMinimumLines
GT-1293 Support minimum-lines attribute on Text elements
2 parents c2320e1 + c18625b commit 0f27a8d

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

public/xmlns/content.xsd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@
355355
</xs:complexType>
356356
</xs:element>
357357

358+
<!-- region text -->
358359
<xs:element name="text">
359360
<xs:complexType>
360361
<xs:simpleContent>
@@ -395,6 +396,20 @@
395396
</xs:restriction>
396397
</xs:simpleType>
397398
</xs:attribute>
399+
400+
<xs:attribute name="minimum-lines" default="0">
401+
<xs:annotation>
402+
<xs:documentation>Defines the minimum number of lines to reserve vertical space for when
403+
rendering this text element.
404+
</xs:documentation>
405+
</xs:annotation>
406+
<xs:simpleType>
407+
<xs:restriction base="xs:int">
408+
<xs:minInclusive value="0" />
409+
</xs:restriction>
410+
</xs:simpleType>
411+
</xs:attribute>
412+
398413
<xs:attributeGroup ref="content:baseAttributes" />
399414
</xs:extension>
400415
</xs:simpleContent>
@@ -439,6 +454,7 @@
439454
<xs:element name="text" type="content:textType" />
440455
</xs:sequence>
441456
</xs:complexType>
457+
<!-- endregion text -->
442458

443459
<xs:element name="image">
444460
<xs:annotation>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<page xmlns:content="https://mobile-content-api.cru.org/xmlns/content"
3+
xmlns="https://mobile-content-api.cru.org/xmlns/tract">
4+
<hero>
5+
<content:paragraph>
6+
<content:text minimum-lines="-1">-1 Lines</content:text>
7+
</content:paragraph>
8+
</hero>
9+
</page>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<page xmlns:content="https://mobile-content-api.cru.org/xmlns/content"
3+
xmlns="https://mobile-content-api.cru.org/xmlns/tract">
4+
<hero>
5+
<content:paragraph>
6+
<content:text minimum-lines="a">"a" Lines</content:text>
7+
</content:paragraph>
8+
</hero>
9+
</page>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<page xmlns:content="https://mobile-content-api.cru.org/xmlns/content"
3+
xmlns="https://mobile-content-api.cru.org/xmlns/tract">
4+
<hero>
5+
<content:paragraph>
6+
<content:text minimum-lines="0">0 Lines</content:text>
7+
<content:text minimum-lines="5">5 Lines</content:text>
8+
</content:paragraph>
9+
</hero>
10+
</page>

0 commit comments

Comments
 (0)