Skip to content

Instantly share code, notes, and snippets.

@ThomasKientz
ThomasKientz / Vue slot prop render.md
Created March 10, 2022 18:07
Pass a render function as a slot prop

Providing a template to a child component to be rendered into.

We have a <CountryList/> component which list some countries.

  • France
  • Spain
  • Italy
@ThomasKientz
ThomasKientz / flex-stacked-layout.html
Last active October 1, 2020 12:22
A stacked layout using flex with a fixed header, a scrollable content and a fixed footer.
<!DOCTYPE html>
<html lang="en">
<body style="margin: 0">
<div style="min-height: 100vh; display: flex; flex-direction: column">
<div style="background-color: darkcyan">Header</div>
<div style="flex: 1 1 0px; overflow: auto">
<div style="height: 20000px">Scrollable content</div>
</div>
<div style="background-color: red">Footer</div>
</div>