Skip to content

Instantly share code, notes, and snippets.

@daneden
Created November 28, 2012 12:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daneden/4160973 to your computer and use it in GitHub Desktop.
Save daneden/4160973 to your computer and use it in GitHub Desktop.
Twitter
/**
* Twitter
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
position: relative;
}
img {
max-width: 100%;
display: block;
}
.cf {
overflow: hidden;
*overflow: visible;
zoom: 1;
}
html, body {
height: 100%;
}
body {
font: 100%/1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
background-color: #943829;
color: #222;
-webkit-font-smoothing: antialiased;
}
.wrap {
text-align: center;
height: 100%;
}
.wrap:before {
content:'';
height: 100%;
display: inline-block;
vertical-align: middle;
margin-right: -.25em;
}
.input {
appearance: none;
border: 0;
border-radius: .25em;
font: inherit;
font-size: .875em;
padding: .4em .5em;
width: 100%;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), inset 0 2px 2px rgba(0,0,0,.2), 0 1px rgba(255,255,255,.3);
}
.input:focus {
outline: none;
box-shadow: inset 0 0 0 1px #00aced, inset 0 2px 2px rgba(0,0,0,.2), 0 1px rgba(255,255,255,.3), 0 0 5px #00aced;;
}
.butt {
display: inline-block;
background-color: #ebebeb;
background-image: linear-gradient(transparent, rgba(0,0,0,.15));
padding: .25em .4em;
border-radius: .25em;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), inset 0 2px rgba(255,255,255,.3), inset 0 0 0 2px rgba(255,255,255,.2);
}
.micro-dm {
float: right;
padding: .05em .2em;
}
.dm-icon {
-webkit-mask-image: -webkit-linear-gradient(#000, rgba(0,0,0,.6));
}
.dm-unread:after {
content:'';
position: absolute;
top: 0;
right: 0;
background-color: #00aced;
border-radius: 100%;
width: .75em;
height: .75em;
margin: -.25em;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), inset 0 2px rgba(255,255,255,.3);
background-image: linear-gradient(transparent, rgba(0,0,0,.2) 75%, transparent);
}
.module {
text-align: left;
display: inline-block;
vertical-align: middle;
width: 300px;
background-color: #ebebeb;
border-radius: .25em;
box-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.module a {
font-weight: 700;
color: #333;
text-decoration: none;
}
.module a:hover {
opacity: .8;
}
.profile {
background-color: #fff;
border-radius: .25em .25em 0 0;
box-shadow: 0 1px 2px rgba(0,0,0,.15);
padding: .5em;
padding-bottom: 0;
margin-bottom: .5em;
}
.avatar, .avatar > img {
width: 4em;
border-radius: 0.1875em;
}
.avatar {
float: left;
margin-right: .5em;
}
.avatar:after {
content:'';
z-index: 1;
border-radius: 0.1875em;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
}
.card {
width: 210px;
float: left;
}
.card .full-name {
display: block;
font-weight: 700;
margin-bottom: .25em;
}
.card .secondary {
opacity: .5;
font-weight: 400;
}
.meta {
padding-top: .25em;
list-style: none;
border-top: 1px solid rgba(0,0,0,.2);
}
.meta li {
display: inline-block;
width: 30%;
margin-right: -.25em;
margin-top: -.25em;
padding-top: .1em;
padding-bottom: .25em;
}
.meta li + li {
width: 35%;
border-left: 1px solid rgba(0,0,0,.2);
padding-left: .5em
}
.meta .count {
display: block;
}
.meta .type {
display: block;
margin-top: -.4em;
}
.mini-post {
margin: 0 .5em .5em;
}
<div class="wrap">
<div class="module cf">
<div class="profile cf">
<a class="avatar" href="http://twitter.com/_dte">
<img src="https://si0.twimg.com/profile_images/2869588029/522a87f8bbd671aa6bcd6508347e08a7.jpeg">
</a>
<div class="card">
<a href="#" class="butt micro-dm dm-unread" title="You have unread messages"><img class="dm-icon" alt="View direct messages" src="http://f.cl.ly/items/151p1e1Q343M2w2f0U2u/Mail.svg" width="21"></a>
<a title="View your profile" href="http://twitter.com/_dte" class="full-name">Dan Eden <small class="screen-name secondary">@_dte</small></a>
<ul class="meta">
<li><a href="http://twitter.com/_dte" class="count">30k <small class="type secondary">tweets</small></a></li>
<li><a href="http://twitter.com/_dte/followers" class="count">3,034 <small class="type secondary">followers</small></a></li>
<li><a href="http://twitter.com/_dte/following" class="count">243 <small class="type secondary">following</small></a></li>
</ul>
</div>
</div>
<div class="mini-post">
<input class="input" placeholder="Compose new Tweet...">
</div>
</div>
</div>
// alert('Hello world!');
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment