Skip to content

Instantly share code, notes, and snippets.

@inxomnyaa
Created July 16, 2015 13:30
Show Gist options
  • Save inxomnyaa/d8724af96917a4e7b439 to your computer and use it in GitHub Desktop.
Save inxomnyaa/d8724af96917a4e7b439 to your computer and use it in GitHub Desktop.
iOS7-style chat balloons
<blockquote class="chat">
<p class="them">
Annie, I'm going to be a lil late for the rehearsal, tonight.
</p>
<p class="me">
S'Okay, Maude. You know your lines...?
</p>
<p class="them">
I know em, I don't know what order they come in...
</p>
<p class="me">
We'll work it out...
</p>
</blockquote>
@grey: #e5e5ea;
@blue: #1289fe;
body {
background: white;
font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
blockquote {
margin: 0 auto;
max-width: 320px;
}
p {
margin: 0 0 0.5em;
border-radius: 1em;
padding: 0.5em 1em;
background: @grey;
max-width: 75%;
clear: both;
position: relative;
&.them {
float: left;
&::after {
content: "";
position: absolute;
left: -0.5em;
bottom: 0;
width: 0.5em;
height: 1em;
border-right: 0.5em solid @grey;
border-bottom-right-radius: 1em 0.5em;
}
}
&.me {
float: right;
background-color: @blue;
color: white;
&::after {
content: "";
position: absolute;
right: -0.5em;
bottom: 0;
width: 0.5em;
height: 1em;
border-left: 0.5em solid @blue;
border-bottom-left-radius: 1em 0.5em;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment