The blockquote tag should be added to the "Allowed HTML tags", and some CSS should be used to distinguish this quoted text from normal text.

Currently, only the 'puthbutton' and 'chameleon' themes have appropriate CSS for blockquotes.

(Incidentally, while searching for 'blockquote' in the source code I found that the php module uses it in its help screen for indentation. This should be removed.)

Comments

mooffie’s picture

Category: bug » task
gábor hojtsy’s picture

Agreed on all fronts. I cannot think of any reason not to include blockquote, and I was beaten by this before on standard Drupal installs. Having nice presentation for blockquotes in Garland and Minnelli might be the hardest part here though. Are you going to get started with a patch?

mooffie’s picture

Assigned: Unassigned » mooffie

I spent some time on this today, but failed, because of CSS cascading rules issues (all dealing with style-rtl.css). I'm assigning this to me (but if there's a willing CSS guru in the crowd, be my guest and take it :-)

Having nice presentation for blockquotes in Garland and Minnelli might [...]

I go for the simplest option: a thick border on the left + italic text.

mooffie’s picture

Assigned: mooffie » Unassigned
Status: Active » Needs review
StatusFileSize
new4.5 KB

I spent some time on this today, but failed, because of [...]

(It turns out that I fell victim to Color's RTL bug. Never mind.)

I'm attaching the blockquote patch.

I go for the simplest option: a thick border on the left + italic text.

The other popular styling for blockquotes is a big double quote graphics, as is done here on drupal.org. I didn't go this way because I thought its light grey color wouldn't necessarily match the color given to the text via the Color module. But maybe I was wrong, and, moreover, it seems it'd be possible to regenerate this image as is done for other images in Garland.

Comments:

A note about the "margin: 1.1em 40px 1.1em 35px" metrics in the CSS: It wasn't chosen arbitrarily. I wanted to stay close to how browsers display the blockquote element. The CSS specifications recommends blockquote { margin: 1.12em 40px } and Mozilla uses blockquote { margin: 1em 40px }, so I chose something very similar.

The color, #69c, I took from "pushbutton", and it goes well with the blueish hues of Bluemarine and Garland.

Note that I couldn't save a few bytes by using the CSS 'border: something' shortcut. I had to fully spell the three properties (border-left-style, border-left-width, border-color) because of the way 'border' works --or else overriding it in `style-rtl.ss' would be tough.

In "Allowed HTML tags" I inserted the "<blockquote>" near the front. It's an important tag and I didn't want to put it at the end of the list.

mooffie’s picture

[...] cannot think of any reason not to include blockquote [...] I was beaten by this before on standard Drupal installs.

Yes, that's why I think adding the blockquote tag is very important. Too many Drupal sites exist that don't enable this tag, and those that do don't bother to style it differently than unquoted text. So since you worry people won't understand it's a quote, you don't use this tag at all.

This tag is very important to communicating. Drupal is about communicating, isn't it?

It's so important that I think it worths investigating generating the double quoted graphics for Garland. And maybe a light grey is neutral and goes well with any color. Feedback from the reviewers here is needed.

I also suggest adding something along the following lines to the update routines:

// Add <blockquote> to the "Allowed HTML tags" if the admin hasn't touched this setting already.
if (variable_get("allowed_html_$i", '') == '<a> <em> <strong> <cite> ...')) {
  variable_set("allowed_html_$i", '<a> <em> <strong> <blockquote> <cite> ...');
}
mooffie’s picture

An offshoot bug: http://drupal.org/node/198664 ("php.module misuses BLOCKQUOTE in its help screen").

robloach’s picture

Component: other » filter.module
Status: Needs review » Reviewed & tested by the community

Reviewed and tested. Good to go.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new34.08 KB
new33.8 KB
new4.71 KB

Hm, the patch only includes changes for bluemarine and Garland. We know Minnelli inherits from Garland, so this should not be fixed there. I also checked other core themes, and they have blockquote support already, so those are done.

While this thick line is not the sexiest solution, it kind of works, and even allows us to make this recolorable, if we use one of the few colors fixes in Garland. So I picked the link color, which allows the blockquote line to adapt to the recolored theme.

gábor hojtsy’s picture

Status: Fixed » Needs work

Sorry guys, I got a post-commit mail from Steven Wittens where he says:

[in Garland] one of the most prominent design features is the use of soft, subtle shadows and gradients to delineate layout, accentuated with thin borders that disappear into their surroundings. This change does not fit in by any measure.

Rolled back. So unless you come up with something sexy fitting exactly into Garland, this is not going to make it.

pancho’s picture

I can very well understand Steven, but it would have been helpful if he came up with a better idea. I think we should definitely get ‹blockquote› in, the looks are important but secondary to the functionality.

robloach’s picture

killes@www.drop.org’s picture

has anybody thought about asking a designer? Such as Stefan Nagtegaal?

cburschka’s picture

I'm not a designer by any means, but I have several suggestions that might improve the look (or might not; I haven't even tried these out in an image editor) without grossly deviating from the "vertical bar" concept:

- Make the bottom end of the bar fade into the background?
- The line could be a bit thinner.
- The whole bar could be a gradient going from dark to light.
- The color of the bar itself should also be lighter in relation to the colors on the rest of the page.

I might suggest putting a very light gradient background behind the whole quote area, but I fear that would interrupt the flow of the rest of the text. I've seen "quote boxes" and while they can work for quoting a longer body of text, they absolutely ruin the text flow if you quote short paragraphs, especially when responding to a text point by point. Limiting the decoration to a single bar on the left side is less obtrusive.

catch’s picture

StatusFileSize
new45.98 KB

I'm no designer either, so I nicked the css/background applied to Garland's fieldsets as that could be good starting point. Here's the css (which is 90% identical to the fieldsets, just changed some margin/padding), and a screenshot with some devel generated content.

Could do with some refinement, but I'd prefer to have opinions on the general approach before getting into it.

blockquote {
  border: 1px solid #d9eaf5;
  background: #fff url(images/gradient-inner.png) repeat-x 0 0;
  padding: 1em 0.5em;
}
cburschka’s picture

Not bad at all! I still believe that a horizontal divider is more obtrusive than a vertical bar, but in this case the border is so light that it hardly distracts.

catch’s picture

StatusFileSize
new5.51 KB

Also, when starting on this I immediately thought, "it'll just look like a fieldset", but I don't think it does really. I know we all know what a garland fieldset looks like, but here's one anyway for direct comparison.

theborg’s picture

To apply a subtle gradient with the images we already have;

blockquote {
  padding: 0 0 0 15px; /* LTR */
  margin: 1.1em 40px 1.1em 35px; /* LTR */
  background: url(images/bg-content-left.png) no-repeat -45px -41px;
  font-style: italic;
}
gábor hojtsy’s picture

catch: I think there is a definite gradient overload in your approach.

cburschka’s picture

StatusFileSize
new5.35 KB

I have produced a screenshot of theborg's change in #17 on Garland with default colors. It could use just a tiny bit more substance (perhaps use a section from higher up in the gradient image?) but it blends in exceedingly well.

theborg@drupal.org’s picture

StatusFileSize
new53.57 KB

Image attached. FF on linux.

cburschka’s picture

Oops. Your screenshot shows something that mine didn't, but which is kind of obvious in retrospect - the bar fades entirely after about 5 lines of quoting. If you are quoting anything much longer - say, a multiple page article - in entirety, the "bar" will become little more than a tiny "icon" in the top left corner of the quote. I'm not sure if this is bad, though.

catch’s picture

I think there ideally ought to be something to designate the end of the blockquote. Wouldn't be hard to make the 'fieldset' gradient shorter so it's a bit less intrusive on the first line of text.

theborg’s picture

Status: Needs review » Needs work
StatusFileSize
new35.77 KB
new4.63 KB

Added a patch with #8 + #17 modified to be longer.

Two things to note:
- to add one more background image we need a wrapper in or outside blockquote,
- I left the original border to the rtl css file, unfortunately css is left oriented.

theborg’s picture

Status: Needs work » Needs review

I don't see how to improve rtl so marking this to review

cburschka’s picture

Status: Needs work » Needs review

- On testing this patch in an rtl locale, any bar, gradient or not, failed to show up entirely. The only thing distinguishing the quote from a normal paragraph was the indentation.

- The bar stops abruptly 16 lines into the quote. Depending on the contrast of your screen, this may not be visible (my laptop screen was tilted back when I noticed) as the final blue is almost white. When it is visible, however, it looks quite broken.

I suppose there is no way to stretch the gradient out indefinitely so that it always ends on the line the quote ends, is there?

catch’s picture

@Arancaytar: I don't think there's a clean and visually appealing way to do that. I've been meaning to do another iteration of #16 with a lighter/shorter gradient - I still think some kind of border/background combination is preferable, or at least something to clearly delineate the end of the blockquote.

theborg’s picture

StatusFileSize
new22.06 KB
new4.79 KB

This is a border version based on #9. I only added a border to the bottom of the blockquote and changed the color.

steinmb’s picture

StatusFileSize
new28.68 KB

Blockquote is a good idea, but the gradient border seems to be mission impossible. I liked the option with an thin thin vertical border that marks the quoted text area. I think there are no need for any additional horizontal line to mark en of quote area, it kind of messes up the layout/flow. Adding a example on a (norwegian) Drupal site with a integrated phpbb forum.

--
Stein Magne

pancho’s picture

#23 is great! Some more testing, and then it's rtbc, imho.

cburschka’s picture

The question is whether the gradient is worth the bug of stopping the marker around 16 lines into the quote. Perhaps a light-colored, but constant bar would achieve the same elegance without looking that broken.

Alternative: Correct me if I'm wrong, but can't you set both an image and a color as a background? If so, we might in theory put a gradient on the first 16 lines, after which the edge of the image is reached, leaving the static color (which matches up with the image, of course).

gábor hojtsy’s picture

Version: 6.x-dev » 7.x-dev

New stuff goes to 7.

cburschka’s picture

A pity, I say; this would have been neat to see in this release cycle. But there's nothing to be done, I guess.

zeta ζ’s picture

StatusFileSize
new61.37 KB
new51.86 KB

I have designed a slightly different approach, combining elements from the rest of Garland. It scales to fit large or small quotes and I think is subtle enough for Garland but distinctive enough to do its job.

It needs a little extra markup added to the <blockquote> tags (as in d.o) but if you like the appearance, I can make sure this works with RTL and in IE6. Votes for italic?

I’d particularly value Steven’s opinion on this.

zeta ζ’s picture

StatusFileSize
new3.6 KB
new2.63 KB

I’ve now implemented this design if you’d like to try it out. One patch for filter, to allow blockquotes in filtered html. One patch for Garland. I haven’t done a patch for Bluemarine as I think the blue left border, from earlier patch, fits well in Bluemarine.

Is code in node.tpl.php a good way to add the extra markup, or is there a better technique?

You’ll need -p1 for these patches (I’ve just setup Netbeans).

zeta ζ’s picture

BTW: This works with rtl and I’ve tested in Firefox and IE6.

Gidgidonihah’s picture

Status: Needs work » Needs review

I personally love the visual approach taken by zeta-zoo in 33

Edit:
I'd like to see screenshots in italic to compare.

floretan’s picture

Status: Needs review » Needs work

Doing a str_replace() on nodes and comments directly in the template files is not the way to go about this problem. If the user input has to be processed it needs to be done with an input filter.

zeta ζ’s picture

Status: Needs review » Needs work

Yes, but I wanted to keep it within Garland for now, until I know whether you like it or not? I've had one vote in 5½ weeks.

If lots of people like this, I'm more than willing to write a new, or modify an existing, default input filter.

Come on guys – wouldn’t it be good to not have these issues (æsthetic as opposed to architectural) in the patch queue when D7-beta1 is released?

floretan’s picture

Status: Needs work » Closed (works as designed)

The issue with #33 and #34 is not an aesthetic one, but the fact that in order to have images on two sides of a blockquote element you need additional non-semantic markup.

Theming blockquote elements was possible in the bluemarine theme because the proposed style didn't require additional markup.

zeta ζ’s picture

Status: Closed (works as designed) » Needs review

I’ll write a module for my suggestion, as flobruit suggested on IRC …

In the meantime, people can still discuss the merits of other ideas as a standard for Garland (& Bluemarine?) #14 - #32?

I like #14 by catch, maybe with italic text as well. +1

zeta ζ’s picture

Finally got ’round to actually releasing a module… http://drupal.org/project/blockquote

mooffie’s picture

Zeta, I don't think your style suits Garland.

Those circles at the corners remind me of pompons at tips of jesters' hats, those employed by kings in the middle ages. It associates with all the other over-decorated stuff you can find in palaces. I think it's called "baroque". I don't think it goes with the elegance of Garland.

I think theborg's style, in comment #23, is fine. A non-gradient version is fine with me, too.

zeta ζ’s picture

Mooffie: I first posted this design February 12, said I would write a module May 7: 2 hours and 12 minutes after I release it, you suddenly decide you don't like it :'(

Just because something is round doesn't mean it's a pom-pom; it could be a rough or imperfect pearl1. Ironically, those circles are part of Garland – there’s no image in the patch (see module’s README.txt).

So we have two votes for #23, one for #14, (sorry Gidgidonihah, you’ll have to use the module). This is like pulling teeth…

1: Baroque

mooffie’s picture

Mooffie: I first posted this design February 12, said I would write a module May 7: 2 hours and 12 minutes after I release it, you suddenly decide you don't like it :'(

It's not suddenly. It's just that I'm not an English speaker, certainly not an Art maven, and I couldn't quite find the words to express my feelings towards your design. It's only for lack of any other option that I'm now talking of jesters and kings :-(

So we have two votes for #23, one for #14,

Hold on, just because I don't like pompons doesn't mean others aren't going to like it. Your design isn't bad! That was only my personal opinion.

zeta ζ’s picture

Don’t worry, I’m not too distraught :'(

I’m not an artist or designer either, I just thought ’alf inchin’ Garland’s line colour and image was the best way to integrate with it. …the sincerest form of flattery.

Thanks Moofie, but I’m led to believe my design won’t be considered because it relies on extra (and un-semantic) mark-up. It also needs a filter to add this mark-up from the blockquote tag. Hence the parenthesised comment, as Gidgidonihah did vote for #33 :-)

cburschka’s picture

Status: Needs review » Needs work

Patch 23 fails on HEAD.

patching file modules/filter/filter.module
Hunk #1 FAILED at 170.
Hunk #2 succeeded at 660 with fuzz 1 (offset -5 lines).
Hunk #3 FAILED at 685.
2 out of 3 hunks FAILED -- saving rejects to file modules/filter/filter.module.rej
patching file themes/bluemarine/style-rtl.css
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file themes/bluemarine/style-rtl.css.rej
patching file themes/bluemarine/style.css
patching file themes/garland/style-rtl.css
patching file themes/garland/style.css
Hunk #1 succeeded at 62 (offset -9 lines).

cburschka’s picture

Status: Needs work » Needs review

This is a pure conflict-resolving re-roll of #23. Personally, I would hope to fix the issue I mentioned earlier.

cburschka’s picture

StatusFileSize
new20.84 KB
new21.95 KB

Well, I've tried, but I noticed that we use the background property to style the quote, rather than the border (border images become available in CSS3). It is impossible to fill part of the background with a solid color, and the border lies just outside the background - so we cannot supplement this quote block gradient with a solid color.

The problem is with extended quote sections, see screenshot.

This might be worth sacrificing the gradient for, leaving us with the other screenshot.

Nick Lewis’s picture

If anyone is looking for inspiration on blockquote styling:
http://www.smashingmagazine.com/2008/06/12/block-quotes-and-pull-quotes-...

+1 for this -- at the very least, I wish blockquotes were allowed by default in filtered html. If we include [cite] there's no reason not to include [blockquote]. Perhaps we could move this forward by just including the core filter patch, and leaving the styling to separate issue?

@Arancaytar -- I don't think the gradient border is necessary -- it's prone to clashing with custom colored versions of garland anyways. Italics, smaller font sizes, slightly lighter font colors would all suffice as an improvement.

catch’s picture

I pretty much agree with Nick on this - especially trying to get the tag into default filters as a first step.

Nick Lewis’s picture

StatusFileSize
new2.52 KB

Rerolled the patch. Only touches filter module per comments above.

zeta ζ’s picture

Thanks for re-rolling Nick – applies cleanly +1

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

great ... we are way to o stingy with these tags in default html filter.

mooffie’s picture

Nick Lewis wrote:

at the very least, I wish blockquotes were allowed by default in filtered html.
[...]
Perhaps we could move this forward by just including the core filter patch, and leaving the styling to separate issue?

-1 for this. So -1 for the #51 patch.

The default styling browsers provide for blockquote is mere indentation. So if in the past I had to nag bloggers: "please enable the blockqote tag, ok?" then from now on I'll have to nag them: "please style the blockquote so that it's clear it's a quote, ok?" There will be no improvement here; The current situation, where blockquote isn't allowed, is preferable.

Worse, that "separate styling issue" will then take months, or years, to settle because it will no longer be urgent.

If we include [cite] there's no reason not to include [blockquote].

The comparison to [cite] isn't valid: browsers do style [cite] differently than the normal text (in italic). That can't be said for [blockquote].

My proposal:

Let's go for the "solid bar, italic text" solution, in Garland, right away. Let's leave the design musings for a different issue.

zeta ζ’s picture

But at least #51 is a step in the right direction.
/me checks the title and component of this thread.

The default styling browsers provide for blockquote is mere indentation. … browsers do style [cite] differently … That can't be said for [blockquote].

I’m afraid that’s a contradiction: ‘mere’ is merely a qualifier, not a negation. Browsers apply a margin on all four sides.

There’s nothing to stop you using your theme (or my module ;-) ) to style the tag how you like. This isn’t about voting for what you like – it’s about choosing a default for Garland.

"solid bar, italic text"

That is #8, which has already been rejected. You could use Bluemarine. BTW I think Bluebeach’s blockquotes need a bit of padding.

So unless you come up with something sexy fitting exactly into Garland, this is not going to make it.

Gábor – my emphasis

I don’t think this thread will die just because the tag is in html filter. I agree with Moshe; my only concern is, are there other tags we can safely allow? but I think other tags would be be committed quickly, once safety was established.

catch’s picture

Another advantage of enabling more default tags is that admins won't be tempted to give the (completely insecure) 'full HTML' input format to untrusted roles.

damien tournoud’s picture

I completely agree with zeta and catch on that one: enabling the tag is a good first step.

mooffie’s picture

Zeta wrote:

[Mooffie wrote,] The default styling browsers provide for blockquote is mere indentation

I’m afraid that’s a contradiction: ‘mere’ is merely a qualifier, not a negation. Browsers apply a margin on all four sides.

Mere indentation is the only thing that distinguishes [blockquote] form normal text.

That's because common browsers assign the same top and bottom margins to P and to BLOCKQOUTE and to more block elements. A proof is here and here.

Damien wrote:

I completely agree with zeta and catch on that one: enabling the tag is a good first step.

That's the crux of my disagreement with you: the fear that we'll stay with mere indentation in Garland, to designate quoted text, for a very long time. This will lead to confusion, because the "general public" may not recognize mere indentation as quoted text.

Zeta wrote:

[Mooffie wrote,] let's go for "solid bar, italic text" right now

That is #8, which has already been rejected.

And that was the innovation in my proposal; First, to re-open that decision (the rejection was by one user). Second, to enable [blockquote] right away and move the styling debate to a separate issue.

catch’s picture

mooffie: IMO it'd be best to start a new issue for blockquote styling in Garland. The 'one user' mentioned happens to be the co-author of Garland. I don't think we should let a useful usability enhancement for the filter module be held up by a theming/design issue. The majority of Drupal sites in production don't use Garland, but they may well use 'filtered html' as the default input format.

cburschka’s picture

Good idea. Take the Garland stuff here #285173: Add style for blockquotes in Garland, so the input format can be fixed. :)

Nick Lewis’s picture

Two things
I. The string containing the filterered html tags is repeated many times through out the code. Would making it a constant be a terrible idea?
II. what are we really trying to prevent with filtered html? For the most part, I would think we trying to prevent common forms of knavery, and tom-foolery that could occur:
1. Running flash, javascript
2. Breaking layouts with unclosed [div] tags.
3. Letting the strangers of the internet add whatever image they please to an entry. [they have the darnedest images sometimes...]
4. Allowing someone to do something like [p style="font-size:300em;"] in a comment.

Should we make filtered html much more liberal, allowing paragraph, header tags, ect?

If we did that, we could rewrite the allowed html tags description (which clients have always made me hide) to be much shorter -- simply stating which tags are NOT allowed.

Any interest in this? Maybe we should just use the same tags that are allowed on this very textarea [ see below the form ].

robloach’s picture

Nick Lewis at #61
The string containing the filterered html tags is repeated many times through out the code. Would making it a constant be a terrible idea?

This problem is solved via hook_variables.

Should we make filtered html much more liberal, allowing paragraph, header tags, ect?

Although I tend to agree with you, I think it should be taken up by a bonus issue.

lilou’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.2 KB

Patch #51 cannot apply to CVS HEAD ... Re-roll.

Add a tip for blockquote :

'blockquote' => array( t('Blockquote'), '<blockquote>' . t('Indent a block of text') . '</blockquote>'),

zeta ζ’s picture

Status: Needs review » Needs work

A tip is a good idea, but <blockquote> should be used to mark a block of text as being a quote (semantic) – not to Indent a block of text (stylistic).

Also, I think the (longer) description goes in tips[][0] — tips[][1] is for 'You Type', 'You Get' columns.

lilou’s picture

Status: Needs work » Needs review
StatusFileSize
new2.54 KB

Also, I think the (longer) description goes in tips[][0] — tips[][1] is for 'You Type', 'You Get' columns.

Yes ... sorry, tip already added :

'blockquote' => array( t('Block quoted'), '<blockquote>' . t('Block quoted') . '</blockquote>'),

zeta ζ’s picture

Status: Needs review » Reviewed & tested by the community

#65 is #51 re-rolled so setting back to RTBC – from #53.

sutharsan’s picture

Component: filter.module » usability

Moving all usability issues to Drupal - component usability.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Obviously there is a lot of contention around design here, including from one of the original Garland theme designers. IMO, we have two issues here:

#1: There's a usability issue, and possibly a security issue, where people end up assigning Full HTML to anonymous users to get access to the blockquote element since it's not enabled by default.

#2: Blockquotes are completely ooglay in Garland and Bluemarine.

I asked Nate Haug/quicksketch, who actually is a designer, unlike myself :) and he agreed that these are two separate issues and should be treated as such.

So I've committed this patch to add blockquote to filtered HTML. Let's pick up the design discussion @ #285173: Add style for blockquotes in Garland. I'm not hopeful of getting Steven Wittens's opinion on this (although I would love to see patches from him! :D) but maybe we can check in with Stefan Nataagenal or other prominent designers in the community on this issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.