diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:37:04 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:49:20 +0200 |
| commit | e35fca54a0c5b3cd5251a58837e9c1ef2b6c3c6d (patch) | |
| tree | 21afd717101000209cd35d07df8034864f29c41f /tests/typ/layout | |
| parent | 1ee1d078e2480ddd08d40915bc7a74a8352acff0 (diff) | |
Change indent from 4 to 2 spaces
Diffstat (limited to 'tests/typ/layout')
| -rw-r--r-- | tests/typ/layout/grid-1.typ | 60 | ||||
| -rw-r--r-- | tests/typ/layout/grid-2.typ | 46 | ||||
| -rw-r--r-- | tests/typ/layout/grid-3.typ | 94 | ||||
| -rw-r--r-- | tests/typ/layout/page.typ | 4 | ||||
| -rw-r--r-- | tests/typ/layout/pagebreak.typ | 6 | ||||
| -rw-r--r-- | tests/typ/layout/stack.typ | 10 |
6 files changed, 110 insertions, 110 deletions
diff --git a/tests/typ/layout/grid-1.typ b/tests/typ/layout/grid-1.typ index fb8a7678..1b66bab4 100644 --- a/tests/typ/layout/grid-1.typ +++ b/tests/typ/layout/grid-1.typ @@ -5,52 +5,52 @@ #page!(width: 100pt, height: 140pt) #grid( - columns: (auto, 1fr, 3fr, 0.25cm, 3%, 2mm + 10%), - rect(0.5cm, rgb("2a631a")), - rect(100%, forest), - rect(100%, conifer), - rect(100%, rgb("ff0000")), - rect(100%, rgb("00ff00")), - rect(80%, rgb("00faf0")), - rect(1cm, rgb("00ff00")), - rect(0.5cm, rgb("2a631a")), - rect(100%, forest), - rect(100%, conifer), - rect(100%, rgb("ff0000")), - rect(100%, rgb("00ff00")), + columns: (auto, 1fr, 3fr, 0.25cm, 3%, 2mm + 10%), + rect(0.5cm, rgb("2a631a")), + rect(100%, forest), + rect(100%, conifer), + rect(100%, rgb("ff0000")), + rect(100%, rgb("00ff00")), + rect(80%, rgb("00faf0")), + rect(1cm, rgb("00ff00")), + rect(0.5cm, rgb("2a631a")), + rect(100%, forest), + rect(100%, conifer), + rect(100%, rgb("ff0000")), + rect(100%, rgb("00ff00")), ) #grid() --- #grid( - columns: (auto, auto, 40%), - gutter-columns: (1fr,), - gutter-rows: (1fr,), - rect(fill: eastern)[dddaa aaa aaa], - rect(fill: conifer)[ccc], - rect(width: 100%, fill: rgb("dddddd"))[aaa], + columns: (auto, auto, 40%), + gutter-columns: (1fr,), + gutter-rows: (1fr,), + rect(fill: eastern)[dddaa aaa aaa], + rect(fill: conifer)[ccc], + rect(width: 100%, fill: rgb("dddddd"))[aaa], ) --- #page!(height: 3cm, width: 2cm) #grid( - columns: (1fr, 1cm, 1fr, 1fr), - column-dir: ttb, - rows: (auto, 1fr), - rect(height: 100%, fill: rgb("222222"))[foo], - rect(height: 100%, fill: rgb("547d0a"))[bar], - rect(height: 100%, fill: eastern)[hab], - rect(height: 100%, fill: conifer)[baz], - rect(height: 100%, width: 100%, fill: rgb("547d0a"))[bar], + columns: (1fr, 1cm, 1fr, 1fr), + column-dir: ttb, + rows: (auto, 1fr), + rect(height: 100%, fill: rgb("222222"))[foo], + rect(height: 100%, fill: rgb("547d0a"))[bar], + rect(height: 100%, fill: eastern)[hab], + rect(height: 100%, fill: conifer)[baz], + rect(height: 100%, width: 100%, fill: rgb("547d0a"))[bar], ) --- #page!(height: 3cm, margins: 0pt) #align!(center) #grid( - columns: (1fr,), - rows: (1fr, auto, 2fr), - [], rect(width: 100%)[A bit more to the top], [], + columns: (1fr,), + rows: (1fr, auto, 2fr), + [], rect(width: 100%)[A bit more to the top], [], ) diff --git a/tests/typ/layout/grid-2.typ b/tests/typ/layout/grid-2.typ index e28cfaf2..fcb7037e 100644 --- a/tests/typ/layout/grid-2.typ +++ b/tests/typ/layout/grid-2.typ @@ -3,27 +3,27 @@ --- #page!(width: 12cm, height: 2.5cm) #grid( - columns: 5, - gutter-columns: (2fr, 1fr, 1fr), - gutter-rows: 4 * (6pt,), - [*Quarter*], - [Expenditure], - [External Revenue], - [Financial ROI], - [_total_], - [*Q1*], - [173,472.57 \$], - [472,860.91 \$], - [51,286.84 \$], - [_350,675.18 \$_], - [*Q2*], - [93,382.12 \$], - [439,382.85 \$], - [-1,134.30 \$], - [_344,866.43 \$_], - [*Q3*], - [96,421.49 \$], - [238,583.54 \$], - [3,497.12 \$], - [_145,659.17 \$_], + columns: 5, + gutter-columns: (2fr, 1fr, 1fr), + gutter-rows: 4 * (6pt,), + [*Quarter*], + [Expenditure], + [External Revenue], + [Financial ROI], + [_total_], + [*Q1*], + [173,472.57 \$], + [472,860.91 \$], + [51,286.84 \$], + [_350,675.18 \$_], + [*Q2*], + [93,382.12 \$], + [439,382.85 \$], + [-1,134.30 \$], + [_344,866.43 \$_], + [*Q3*], + [96,421.49 \$], + [238,583.54 \$], + [3,497.12 \$], + [_145,659.17 \$_], ) diff --git a/tests/typ/layout/grid-3.typ b/tests/typ/layout/grid-3.typ index 450ce60c..7e66eb2e 100644 --- a/tests/typ/layout/grid-3.typ +++ b/tests/typ/layout/grid-3.typ @@ -3,16 +3,16 @@ --- #page!(width: 5cm, height: 3cm) #grid( - columns: 2, - gutter-rows: 3 * (8pt,), - [Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + columns: 2, + gutter-rows: 3 * (8pt,), + [Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis.], - [Text that is rather short], - [Fireflies], - [Critical], - [Decorum], - [Rampage], + Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis.], + [Text that is rather short], + [Fireflies], + [Critical], + [Decorum], + [Rampage], ) --- @@ -20,60 +20,60 @@ // that. #page!(width: 5cm, height: 2cm) #grid( - columns: 4 * (1fr,), - gutter-rows: (10pt,), - gutter-columns: (0pt, 10%), - image("../../res/rhino.png"), - align(right, rect(width: 100%, fill: eastern)[LoL]), - [rofl], - [\ A] * 3, - [Ha!\ ] * 3, + columns: 4 * (1fr,), + gutter-rows: (10pt,), + gutter-columns: (0pt, 10%), + image("../../res/rhino.png"), + align(right, rect(width: 100%, fill: eastern)[LoL]), + [rofl], + [\ A] * 3, + [Ha!\ ] * 3, ) --- // Test two columns in the same row overflowing by a different amount. #page!(width: 5cm, height: 2cm) #grid( - columns: 3 * (1fr,), - gutter-rows: (8pt,), - gutter-columns: (0pt, 10%), - [A], [B], [C], - [Ha!\ ] * 6, - [rofl], - [\ A] * 3, - [hello], - [darkness], - [my old] + columns: 3 * (1fr,), + gutter-rows: (8pt,), + gutter-columns: (0pt, 10%), + [A], [B], [C], + [Ha!\ ] * 6, + [rofl], + [\ A] * 3, + [hello], + [darkness], + [my old] ) --- // Test grid within a grid, overflowing. #page!(width: 5cm, height: 2.25cm) #grid( - columns: 4 * (1fr,), - gutter-rows: (10pt,), - gutter-columns: (0pt, 10%), - [A], [B], [C], [D], - grid(columns: 2, [A], [B], [C\ ]*3, [D]), - align(right, rect(width: 100%, fill: eastern)[LoL]), - [rofl], - [E\ ]*4, + columns: 4 * (1fr,), + gutter-rows: (10pt,), + gutter-columns: (0pt, 10%), + [A], [B], [C], [D], + grid(columns: 2, [A], [B], [C\ ]*3, [D]), + align(right, rect(width: 100%, fill: eastern)[LoL]), + [rofl], + [E\ ]*4, ) --- // Test partition of `fr` units before and after multi-region layout. #page!(width: 5cm, height: 4cm) #grid( - columns: 2 * (1fr,), - rows: (1fr, 2fr, auto, 1fr, 1cm), - gutter-rows: 4 * (10pt,), - rect(height: 100%, width: 100%, fill: rgb("ff0000"))[No height], - [foo], - rect(height: 100%, width: 100%, fill: rgb("fc0030"))[Still no height], - [bar], - [The nature of being itself is in question. Am I One? Am I Many? What is being alive?], - [baz], - [The answer], - [42], - [Other text of interest], + columns: 2 * (1fr,), + rows: (1fr, 2fr, auto, 1fr, 1cm), + gutter-rows: 4 * (10pt,), + rect(height: 100%, width: 100%, fill: rgb("ff0000"))[No height], + [foo], + rect(height: 100%, width: 100%, fill: rgb("fc0030"))[Still no height], + [bar], + [The nature of being itself is in question. Am I One? Am I Many? What is being alive?], + [baz], + [The answer], + [42], + [Other text of interest], ) diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ index ba87ad51..80a644fb 100644 --- a/tests/typ/layout/page.typ +++ b/tests/typ/layout/page.typ @@ -8,8 +8,8 @@ // Set all margins at once. #page(margins: 30pt)[ - #align(top, left)[TL] - #align(bottom, right)[BR] + #align(top, left)[TL] + #align(bottom, right)[BR] ] // Set individual margins. diff --git a/tests/typ/layout/pagebreak.typ b/tests/typ/layout/pagebreak.typ index ff15d156..20962a71 100644 --- a/tests/typ/layout/pagebreak.typ +++ b/tests/typ/layout/pagebreak.typ @@ -9,9 +9,9 @@ First of two // Make sure that you can't do page related stuff in a container. A #box[ - B - #pagebreak() - #page("a4")[] + B + #pagebreak() + #page("a4")[] ] C diff --git a/tests/typ/layout/stack.typ b/tests/typ/layout/stack.typ index 7f434bd2..729d85fc 100644 --- a/tests/typ/layout/stack.typ +++ b/tests/typ/layout/stack.typ @@ -3,9 +3,9 @@ --- #let rect(width, fill) = rect(width: width, height: 1cm, fill: fill) #stack( - rect(2cm, rgb("2a631a")), - rect(3cm, forest), - rect(1cm, conifer), + rect(2cm, rgb("2a631a")), + rect(3cm, forest), + rect(1cm, conifer), ) --- @@ -13,6 +13,6 @@ #let rect(width, fill) = rect(width: 1cm, height: 0.4cm, fill: fill) #box(height: 0.5cm, stack( - rect(3cm, forest), - rect(1cm, conifer), + rect(3cm, forest), + rect(1cm, conifer), )) |
