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/Twitter.svelte

130 lines
2.6 KiB

<script>
import Icon from '../components/Icon.svelte';
</script>
<style>
content {
border: 1px solid #ddd;
display: flex;
flex-direction: row;
flex: flex-grow;
flex-basis: 100%;
grid-column: 1/3;
padding: 0rem;
}
middle {
display: flex;
flex: 2;
flex-direction: column;
}
header {
width: 100%;
text-align: unset;
}
header nav {
justify-content: left;
}
header nav back {
padding-left: 1rem;
padding-right: 1rem;
}
header nav name h4 {
margin: unset;
padding: unset;
}
header nav name span {
font-size: 0.8em;
font-weight: normal;
}
middle images {
display: grid;
grid-template-columns: 1fr min-content;
}
middle images figure#background {
z-index: -1;
grid-column: 1/2;
grid-row: 1/ span 2;
}
figure#background img {
height: 200px;
min-width: 500px;
}
middle images figure#avatar {
z-index: 5;
grid-column: 1/1;
grid-row: 2/2;
}
middle images figure#avatar img {
z-index: 5;
position: relative;
top: 90px;
left: 10px;
width: 128px;
}
figure#avatar img {
border-radius: 50%;
border: 5px white solid;
}
button#follow {
padding: 0.8rem;
border-radius: 30px;
border: 1px var(--color) solid;
background: var(--color-bg);
color: var(--color);
position: relative;
top: 60px;
left: 220px;
}
profile {
margin-top: 6rem;
margin-left: 1rem;
margin-right: 1rem;
}
</style>
<content>
<middle>
<header>
<nav>
<back><Icon name="arrow-left" /></back>
<name>
<h4>Zed A. Shaw, Writer</h4>
<span>7,754 Tweets</span>
</name>
</nav>
</header>
<images>
<figure id="background">
<img alt="Profile background" src="/header_pic.jpg">
</figure>
<figure id="avatar">
<img alt="Profile picture" src="/profile_pic.jpg">
<button id="follow">Follow</button>
</figure>
</images>
<profile>
<h3>Zed A. Shaw, Writer</h3>
<p>@lzsthw</p>
<p>The author of The Hard Way Series published by Addison/Wesley including Learn Python The Hard Way and many more. Follow me here for coding tips and book news.</p>
<p><Icon name="map" size="24" color="var(--color-bg-secondary)" /> Some Place, KY <Icon name="link" size="24" color="var(--color-bg-secondary)" /> <a>learnjsthehardway.org</a> <Icon name="calendar" size="24" color="var(--color-bg-secondary)" /> Joined Jan, 1999. </p>
<p><b>167</b> Following <b>10.4k</b> Followers</p>
</profile>
</content>