mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-06 17:27:57 +00:00
working grid for fill and auto
This commit is contained in:
@@ -36,10 +36,11 @@ $xrpl-grid-gutter: 8px;
|
||||
}
|
||||
|
||||
@mixin xrpl-grid-generate-fill($suffix: null) {
|
||||
$selector: if($suffix, ".xrpl-grid__col-#{$suffix}", ".xrpl-grid__col");
|
||||
$selector: if($suffix, ".xrpl-grid__col-#{$suffix}-fill", ".xrpl-grid__col-fill");
|
||||
|
||||
#{$selector} {
|
||||
flex: 1 0 0;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +126,7 @@ $xrpl-grid-gutter: 8px;
|
||||
|
||||
&__col {
|
||||
box-sizing: border-box;
|
||||
flex: auto;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
@@ -169,6 +171,4 @@ $xrpl-grid-gutter: 8px;
|
||||
@include xrpl-grid-generate-cols(12, 'xl');
|
||||
@include xrpl-grid-generate-auto('xl');
|
||||
@include xrpl-grid-generate-offsets(12, 'xl');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -40,10 +40,9 @@ const classForSpan = (prefix: string | null, value: PageGridSpanValue): string =
|
||||
}
|
||||
|
||||
if (value === "fill") {
|
||||
// Generates xrpl-grid__col or xrpl-grid__col-md (based on documentation)
|
||||
// Note: The documentation states 'xrpl-grid__col' for fill, and 'xrpl-grid__col-{breakpoint}' for fill
|
||||
// The implementation below aligns with the documentation's example logic:
|
||||
return prefix ? `xrpl-grid__col${prefixStr}` : "xrpl-grid__col";
|
||||
// Generates xrpl-grid__col-fill or xrpl-grid__col-md-fill
|
||||
// This allows us to distinguish between "no span" and "span='fill'" in CSS
|
||||
return `xrpl-grid__col${prefixStr}-fill`;
|
||||
}
|
||||
|
||||
// Generates xrpl-grid__col-6 or xrpl-grid__col-md-6
|
||||
|
||||
Reference in New Issue
Block a user