mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-19 16:54:24 +01:00
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
This commit is contained in:
parent
81b1e6801f
commit
2854c5c3fb
6
css.html
6
css.html
@ -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 %}
|
||||
|
24
dist/css/bootstrap.css
vendored
24
dist/css/bootstrap.css
vendored
@ -616,18 +616,19 @@ abbr[data-original-title] {
|
||||
blockquote {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px;
|
||||
font-size: 17.5px;
|
||||
border-left: 5px solid #eee;
|
||||
}
|
||||
blockquote p {
|
||||
font-size: 17.5px;
|
||||
}
|
||||
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';
|
||||
}
|
||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
8
dist/js/bootstrap.js
vendored
8
dist/js/bootstrap.js
vendored
@ -1573,15 +1573,15 @@ 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')
|
||||
.addClass('active')
|
||||
|
||||
if (active.parent('.dropdown-menu').length) {
|
||||
if (active.parent('.dropdown-menu').length) {
|
||||
active = active
|
||||
.closest('li.dropdown')
|
||||
.addClass('active')
|
||||
|
@ -263,12 +263,15 @@ abbr[data-original-title] {
|
||||
blockquote {
|
||||
padding: (@line-height-computed / 2) @line-height-computed;
|
||||
margin: 0 0 @line-height-computed;
|
||||
font-size: (@font-size-base * 1.25);
|
||||
border-left: 5px solid @blockquote-border-color;
|
||||
p {
|
||||
font-size: (@font-size-base * 1.25);
|
||||
}
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol {
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Deprecating small and .small for v3.1
|
||||
@ -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 {
|
||||
padding-right: 15px;
|
||||
padding-left: 0;
|
||||
border-right: 5px solid @blockquote-border-color;
|
||||
border-left: 0;
|
||||
p,
|
||||
small,
|
||||
.small {
|
||||
text-align: right;
|
||||
}
|
||||
small,
|
||||
.small {
|
||||
&:before {
|
||||
content: '';
|
||||
}
|
||||
&:after {
|
||||
content: '\00A0 \2014'; // NBSP, EM DASH
|
||||
}
|
||||
// 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;
|
||||
text-align: right;
|
||||
|
||||
// Account for citation
|
||||
footer,
|
||||
small,
|
||||
.small {
|
||||
&:before { content: ''; }
|
||||
&:after {
|
||||
content: '\00A0 \2014'; // nbsp, em dash
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user