otclient-redemption/docs/exampleHTML_flex/15-equal-height-cards.html
kokekanon 230fd90a26
improve(HTML): add full flex support (#1672)
New Features:
- In-app Examples tab with preview pane, responsive demo tab, and tabbed interface for browsing examples.

Bug Fixes:
- More accurate, stable scrollbar and flex layout sizing; improved relayout behavior and text wrapping/font-size handling.

Documentation:
- Added 20+ self-contained Flexbox example pages covering direction, justify/align, wrap/gap, item props, patterns (navbars, cards, dashboards, chat, kanban, etc.).

Style:
- Updated demo UI/CSS for improved spacing, preview layout, and responsive preview behavior.
2026-04-18 16:26:35 -03:00

86 lines
No EOL
1.9 KiB
HTML

<html>
<style>
window {
font-family: Arial, sans-serif;
margin: 24px;
background-color: #ffffff;
color: #222222;
height: 100%;
margin-top: 0;
margin-left: 0;
margin-right: 0;
display: block !important;
--image-source: none;
display: block !important;
width: 100% !important;
height: 100% !important;
margin: 0 !important;
overflow: visible !important;
}
.example {
border: 2px solid #6a1b9a;
border-radius: 8px;
padding: 12px;
margin-bottom: 16px;
}
/* Card grid: equal-height cards using align-items: stretch */
.grid {
display: flex;
gap: 12px;
align-items: stretch;
}
.card {
flex: 1;
background-color: #f3e5f5;
padding: 12px;
border-radius: 6px;
display: flex;
flex-direction: column;
}
.title {
font-weight: bold;
margin-bottom: 8px;
}
.content1 {
flex: 1;
color: #333;
}
.actions {
margin-top: auto;
}
</style>
<window>
<h1>Flex: Equal-height Cards</h1>
<p>Cards keep the same height because the grid uses align-items: stretch and each card is a column flex container.</p>
<div class="example">
<div class="grid">
<div class="card">
<div class="title">Card A</div>
<div class="content1">Short text.</div>
<div class="actions">Buttons</div>
</div>
<div class="card">
<div class="title">Card B</div>
<div class="content1">A bit more content1 that makes this card taller than Card A unless equalized by flexbox.
</div>
<div class="actions">Buttons</div>
</div>
<div class="card">
<div class="title">Card C</div>
<div class="content1">Even more content1 to test stretching behaviour. The middle area expands while actions
stay at the bottom.</div>
<div class="actions">Buttons</div>
</div>
</div>
</div>
</window>
</html>