Commit 2854c5c3 authored by Mark Otto's avatar Mark Otto

Fixes #11952: Refactor blockquote styles

* Deprecate .pull-right class for .blockquote-reverse
* Move font-size change to the parent, blockquote, instead of setting on the p element to allow more flexible content
parent 81b1e680
......@@ -872,15 +872,15 @@ base_url: "../"
{% endhighlight %}
<h4>Alternate displays</h4>
<p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p>
<p>Add <code>.blockquote-reverse</code> for blockquote with right-aligned content.</p>
<div class="bs-example" style="overflow: hidden;">
<blockquote class="pull-right">
<blockquote class="blockquote-reverse">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
</div>
{% highlight html %}
<blockquote class="pull-right">
<blockquote class="blockquote-reverse">
...
</blockquote>
{% endhighlight %}
......
......@@ -616,18 +616,19 @@ abbr[data-original-title] {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
border-left: 5px solid #eee;
}
blockquote p {
font-size: 17.5px;
border-left: 5px solid #eee;
}
blockquote p:last-child {
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
display: block;
font-size: 80%;
line-height: 1.428571429;
color: #999;
}
......@@ -636,22 +637,27 @@ blockquote small:before,
blockquote .small:before {
content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
text-align: right;
border-right: 5px solid #eee;
border-left: 0;
}
blockquote.pull-right p,
blockquote.pull-right small,
blockquote.pull-right .small {
text-align: right;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
content: '\00A0 \2014';
}
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1573,9 +1573,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
.parents('.active')
.removeClass('active')
var selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
......
......@@ -263,13 +263,16 @@ abbr[data-original-title] {
blockquote {
padding: (@line-height-computed / 2) @line-height-computed;
margin: 0 0 @line-height-computed;
border-left: 5px solid @blockquote-border-color;
p {
font-size: (@font-size-base * 1.25);
}
p:last-child {
border-left: 5px solid @blockquote-border-color;
p,
ul,
ol {
&:last-child {
margin-bottom: 0;
}
}
// Deprecating small and .small for v3.1
// Context: https://github.com/twbs/bootstrap/issues/11660
......@@ -277,32 +280,34 @@ blockquote {
small,
.small {
display: block;
font-size: 80%; // back to default font-size
line-height: @line-height-base;
color: @blockquote-small-color;
&:before {
content: '\2014 \00A0'; // EM DASH, NBSP
content: '\2014 \00A0'; // em dash, nbsp
}
}
}
// Float right with text-align: right
&.pull-right {
// Opposite alignment of blockquote
//
// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid @blockquote-border-color;
border-left: 0;
p,
small,
.small {
text-align: right;
}
// Account for citation
footer,
small,
.small {
&:before {
content: '';
}
&:before { content: ''; }
&:after {
content: '\00A0 \2014'; // NBSP, EM DASH
}
content: '\00A0 \2014'; // nbsp, em dash
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment