An experiment in cleaning up CSS by just avoiding dis-features and focusing on flexbox and CSS grids.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
fsckcss/src/thumbs/Tiles.svelte

63 lines
1.2 KiB

<script>
import Icon from '../components/Icon.svelte';
import { holder } from '../../lib/imgholder.js';
</script>
<style>
content {
display: flex;
flex: flex-shrink;
flex-grow: 1;
justify-content: center;
}
tile {
padding: 0.5rem;
display: flex;
flex-direction: row;
border: 1px solid #eee;
max-width: 50vh; /* only for this display, I'd remove this. */
}
tile middle {
padding-left: 0.5rem;
padding-right: 0.5rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
flex-shrink: 3;
}
tile middle h4 {
margin-top: 0;
margin-bottom: 0;
}
tile right {
flex-shrink: 0;
}
tile right button {
padding: 0.2rem;
}
</style>
<content>
<tile>
<left>
<img src={ holder(48, 48) }/>
</left>
<middle>
<h4>
Tile Example
</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</middle>
<right>
<button><Icon name="check-circle" color="var(--color-bg)" size="24" /></button>
<button><Icon name="x-circle" color="var(--color-bg)" size="24"/></button>
</right>
</tile>
</content>