Making WordPress.org

Opened 9 years ago

Closed 9 years ago

#1223 closed defect (bug) (fixed)

Trac blockquote padding

Reported by: afercia's profile afercia Owned by: ocean90's profile ocean90
Milestone: Priority: normal
Component: Trac Keywords: has-patch commit
Cc:

Description

When using a leading space the text is quoted and Trac outputs a <blockquote> element with a paragraph inside it which is perfect markup. Would be a nice touch adjusting margin and padding to make it visually balanced:

https://cldup.com/uwWT6Y8bar.png

I often found myself giving up and not using a blockquote just because it looks bad :) Something like this should be specific enough:

#main blockquote:not(.citation) p:first-child {
	margin-top: -8px;
}

After:

https://cldup.com/ALv8mr_GTb.png

Attachments (3)

trac-blockquote-styling.png (191.2 KB) - added by melchoyce 9 years ago.
meta-1223.patch (578 bytes) - added by SergeyBiryukov 9 years ago.
meta-1223.png (36.2 KB) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (9)

#1 @nacin
9 years ago

@helen, @ocean90? Seems fine to me.

#2 @helen
9 years ago

Visually makes sense to fix this, I don't know how particular we want to get with Trac styling but I'd rather see all the padding on the blockquote itself and then margin resets on the first and last paragraphs - 8px isn't going to give consistent results as related to an em (looks off on my setup). If using the negative margin hack, need to add an inline comment about it, at least :)

#3 @melchoyce
9 years ago

How about this?

blockquote {
    background: #f5f5f5;
    border: 1px solid #dadada;
    padding: 1em;
    margin-bottom: 1.5em;
}

#main blockquote > p:first-of-type {
    margin: 0;
}

#main blockquote > p:last-of-type {
    margin-bottom: 0;
}

Uploading a screenshot as well.

#4 @SergeyBiryukov
9 years ago

  • Keywords has-patch added

The current style comes from wp4.css and conflicts with the paragraph styling in wp-trac.css.

In wp4.css:

#pagebody p {
	margin: 0 0 22px 0;
}
...
blockquote {
	background: #f5f5f5;
	border: 1px solid #dadada;
	padding: 22px 22px 0;
	margin-bottom: 22px;
}

In wp-trac.css:

#main h3, #main dl, #main p {
	margin-top: 1em;
	margin-bottom: 1em;
}

Note the extra margin-top. The styles are also inconsistent, in wp4.css they're in px, and in wp-trac.css they're in em.

meta-1223.patch brings some consistency and fixes the issue. Screenshot: meta-1223.png.

#5 @SergeyBiryukov
9 years ago

  • Keywords commit added

#6 @ocean90
9 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 2248:

Trac: Improve blockquote padding/margin.

Props melchoyce, SergeyBiryukov.
Fixes #1223.

Note: See TracTickets for help on using tickets.