blockquote, *:first-child and *:last-child spacing

This commit is contained in:
Jeff Atwood 2014-06-30 02:42:49 -07:00
parent d379012dbc
commit d2cf921791
2 changed files with 21 additions and 7 deletions

View file

@ -670,18 +670,23 @@ blockquote {
margin-right: 0;
padding: 12px;
a.mention {background: darken(scale-color-diff(), 10%);}
p:first-of-type {margin-top: 0;}
p:last-of-type {margin-bottom: 0;}
h1:first-of-type, h2:first-of-type, h3:first-of-type { margin-top: 0;}
}
// we assume blockquotes have their own margins, so all blockquotes
// will remove margins from first (top) and last (bottom) child elements
blockquote > *:first-child {
margin-top: 0;
}
blockquote > *:last-child {
margin-bottom: 0;
}
/* quotes with attribution */
.quote {
&>blockquote {
margin-top: 0;
padding-top: 0;
p:first-of-type {margin:0;}
h1:first-of-type, h2:first-of-type, h3:first-of-type { margin-top: 0;}
.onebox-result {
background-color: scale-color-diff();
}

View file

@ -479,6 +479,15 @@ blockquote {
margin-right: 0;
}
// we assume blockquotes have their own margins, so all blockquotes
// will remove margins from first (top) and last (bottom) child elements
blockquote > *:first-child {
margin-top: 0;
}
blockquote > *:last-child {
margin-bottom: 0;
}
.quote-controls {
float: right;
color: $primary;