added max-width param to _col
This commit is contained in:
parent
ab1386e721
commit
b33531bef5
@ -19,14 +19,15 @@
|
||||
),)
|
||||
}
|
||||
|
||||
#let _col(p1, p2, width: auto, margin: 0, min-width: 0) = {
|
||||
#let _col(p1, p2, width: auto, margin: 0, min-width: 0, max-width: none) = {
|
||||
return ((
|
||||
type: "col",
|
||||
p1: p1,
|
||||
p2: p2,
|
||||
width: width,
|
||||
margin: margin,
|
||||
min-width: min-width
|
||||
min-width: min-width,
|
||||
max-width: max-width
|
||||
),)
|
||||
}
|
||||
|
||||
|
@ -218,10 +218,13 @@
|
||||
if elmt.width != auto {
|
||||
widths.at(i) = normalize-units(elmt.width)
|
||||
}
|
||||
widths.at(i) = calc.max(
|
||||
widths.at(i),
|
||||
normalize-units(elmt.min-width)
|
||||
) + normalize-units(elmt.margin)
|
||||
|
||||
let width = widths.at(i)
|
||||
width = calc.max(width, normalize-units(elmt.min-width))
|
||||
if elmt.max-width != none {
|
||||
width = calc.min(width, normalize-units(elmt.max-width))
|
||||
}
|
||||
widths.at(i) = width + normalize-units(elmt.margin)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user