Problem/Motivation

The HTML Element <blockquote> (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation, but it seems to be missed in the Claro theme, please refer to the screenshot attached.

There's nothing about quotes at https://www.drupal.org/docs/8/core/themes/claro-theme/design

Steps to reproduce

  1. Install Drupal core 9.2.0
  2. Create a post with this in the body:
    <blockquote>
    <p>This should be inside a blockquote.</p>
    <p>This is the second paragraph inside the blockquote.</p>
    </blockquote> 
    
  3. View the post with the Claro theme.

Proposed resolution

Style blockquotes in Claro.

Remaining tasks

  1. Design a blockquote style for Claro and update the style guide.
  2. Implement it.
  3. Reviews / refinements.
  4. RTBC.
  5. Commit.

User interface changes

Yes. New designs by @saschaeggi:


Figma: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...

Steps to validate/reproduce

Testing Steps:
# Go to Appearance -> Set Claro theme
# Create a blockquote post in the body
# Save it

Expected Results:
# Quotations should have appeared for the HTML blockquote Element in the Claro theme

Actual Results:
# Quotations are missing for the HTML blockquote Element in the Claro theme

API changes

Nope.

Data model changes

N/A.

Release notes snippet

TBD, probably not.

CommentFileSizeAuthor
#55 3214124-51-d10.patch2.8 KBlauriii
#51 interdiff_3214124_49-51.txt1.43 KBankithashetty
#51 3214124-51.patch2.21 KBankithashetty
#49 3214124-49.patch2.18 KBgauravvvv
#49 interdiff-46-49.txt1.5 KBgauravvvv
#46 3214124--46--no-close-quote.png551.83 KBjavi-er
#46 3214124--46--firefox.png467.38 KBjavi-er
#46 3214124--46--edge-windows.png3.05 MBjavi-er
#46 3214124--46--after--mobile.png349.36 KBjavi-er
#46 3214124--46--after--desktop.png654.59 KBjavi-er
#46 3214124-46.patch1.63 KBjavi-er
#44 3214124--after--patch--pic.png27.57 KBvikashsoni
#44 3214124--before--patch--pic.png25.49 KBvikashsoni
#40 claro_new_quote.png489.8 KBsaschaeggi
#39 3214124-quotations-are-missing.patch1.31 KBvicheldt
#39 without_<p>.png23.19 KBvicheldt
#39 with_<p>.png23.52 KBvicheldt
#34 3214124-23.safari.png13.79 KBdww
#34 3214124-23.firefox.png14.48 KBdww
#34 3214124-23.chrome.png13.91 KBdww
#32 3214124-32.blockquote-no-font-family.png13.67 KBdww
#29 interdiff-3214124-23-29.txt862 bytesyogeshmpawar
#29 3214124-29.patch1.36 KByogeshmpawar
#26 After Patch.png171.42 KBroshanibhangale
#26 Before Patch.png220.69 KBroshanibhangale
#23 interdiff_21-23.txt1.41 KBkostyashupenko
#23 3214124-23.patch1.4 KBkostyashupenko
#22 After Patch 3214124.png455.99 KBchetanbharambe
#22 Before Patch 3214124.png236.49 KBchetanbharambe
#21 interdiff-21-19.txt1.61 KBimalabya
#21 3214124-21.patch1.38 KBimalabya
#19 3214124.19.patch1.43 KBnaveen433
#19 interdiff_[16]-[19].txt675 bytesnaveen433
#16 Screenshot 1943-04-16 at 10.44.39 AM.png558.9 KBsakthivel m
#16 3214124.16.patch1.43 KBsakthivel m
#14 Screenshot 2021-06-30 at 11.36.59.png314.93 KBckrina
#13 Screenshot 2021-07-03 at 9.01.22 PM.png281.16 KBimalabya
#13 3214124-13.patch1.29 KBimalabya
#12 3214124-12.patch1.12 KBimalabya
#12 Screenshot 2021-07-03 at 8.46.28 PM.png252.66 KBimalabya
#10 Claro_blockquote_ideas.png588.28 KBsaschaeggi
#7 after.png141.71 KBradheymkumar
#7 before.png113.05 KBradheymkumar
#6 after-patch-blockquote.png212.41 KBMadhu kumar
#6 before-patch-blockquote.png221.36 KBMadhu kumar
#5 after_patch-3214124.png26.26 KBguilhermevp
#5 before_patch-3214124.png21.87 KBguilhermevp
#4 After patch.png34.28 KBmitthukumawat
#4 Before patch.png32.55 KBmitthukumawat
#3 3214124.3.patch2.64 KBsakthivel m
Screenshot 2021-05-15 at 9.38.30 AM.png459.27 KBtushar_sachdeva

Comments

tushar_sachdeva created an issue. See original summary.

tushar_sachdeva’s picture

Issue summary: View changes
sakthivel m’s picture

Status: Active » Needs review
StatusFileSize
new2.64 KB

#3 Please review the patch

mitthukumawat’s picture

StatusFileSize
new32.55 KB
new34.28 KB

I have applied the patch #3. The issue is fixed and i can see the

Element. Adding before and after patch screenshots for reference.
guilhermevp’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new21.87 KB
new26.26 KB

Patch works as intended. Adding evidence as well.

- Created an article in source:

<blockquote>
<p>This should be inside a blockquote</p>
</blockquote> 

Before patch:
1

After patch:
2

Moving to RTBC!

Madhu kumar’s picture

StatusFileSize
new221.36 KB
new212.41 KB

Patch #3 applied cleanly and working as expected , sharing screenshot for reference.

radheymkumar’s picture

StatusFileSize
new113.05 KB
new141.71 KB

Successfully applied patch
Thanks

dww’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Bug Smash Initiative

Thanks for the issue, the patch, and all the reviews!

@radheymkumar and @Madhu kumar -- we've already had multiple folks post before/after screenshots, so we don't need more of those. We also know the patch applies cleanly thanks to the d.o test bot. Instead of duplicating the work other folks have done, it'd be more helpful to either do a careful code review, or find another issue that Needs screenshots and test/review that, instead. Removing issue credit for now, although if you meaningfully contribute here, someone can always restore the credit.

Meanwhile, some concerns on the implementation from #3. I'm only commenting on the .pcss files, since the .css ones are auto-generated from those.

  1. +++ b/core/themes/claro/css/base/elements.pcss.css
    @@ -109,8 +109,29 @@ dl dl {
    -  margin: 1em 40px;
    +  margin: 1.5em 0.625em;
    +  padding: 0.5em 1em;
    

    I don't see any discussion of making such a large change to the top/bottom spacing as this. This is doubling the spacing. Not sure that's necessary or advisable.

  2. +++ b/core/themes/claro/css/base/elements.pcss.css
    @@ -109,8 +109,29 @@ dl dl {
    +  font-style: italic;
    

    I'm not sure we want the entire quote to become italicized. This would be especially hard to read for a large quote, and would mask <em> or <cite> tags within the quote.

  3. +++ b/core/themes/claro/css/base/elements.pcss.css
    @@ -109,8 +109,29 @@ dl dl {
    +  &::after,
    +  &::before {
    ...
    +  &::before {
    

    Seems a little weird to define 6 properties for both the ::after and ::before selectors, then override half of them for the ::before case. I wonder if there's a cleaner/simpler way to express this.

    Meanwhile, a lot of <blockquote> styles in the wild only use the quotes for the ::before case, anyway. So maybe the simplest solution is a design with only the opening quote marks?

  4. +++ b/core/themes/claro/css/base/elements.pcss.css
    @@ -109,8 +109,29 @@ dl dl {
    +    font-family: "Times New Roman", Times, serif;
    

    Seems really weird to introduce a whole new font-family to Claro just for these quote marks. Seems we should fall-back to whatever font-family is already in use.

  5. +++ b/core/themes/claro/css/base/elements.pcss.css
    @@ -109,8 +109,29 @@ dl dl {
    +
    

    Doesn't look like this file puts newlines between the rules, so we should probably leave this one out.

  6. +++ b/core/themes/claro/css/components/form--text.pcss.css
    @@ -122,6 +122,10 @@ _:-ms-fullscreen,
    +.quickedit-toolgroup.wysiwyg-main form label {
    +  padding-right: 0.8rem;
    +}
    +
    

    This seems out of scope and unrelated. We should remove this from the patch.

More generally, is there not an existing Claro <blockquote>design we can implement here? I feel weird commenting on design choices, but I don't see any references to Claro's prior art in this space, so I'm doing the bikeshed thing and adding my $0.02 of unsolicited design opinions, instead. ;)

Finally, @all: if you want to use html tags in your comments, don't forget to wrap them in <code> tags, or else d.o will try to render them directly. ;)

<blockquote> is just a tag for reference.

This is an actual quote

;)

Thanks,
-Derek

dww’s picture

Issue summary: View changes
Issue tags: +Needs design

Yeah, drat, I see nothing about quotes at https://www.drupal.org/docs/8/core/themes/claro-theme/design

Tagging for "Needs design" so we can get the Claro maintainers to come up with a goal here that can then be implemented.

Also, adding a real issue summary.

Thanks,
-Derek

saschaeggi’s picture

StatusFileSize
new588.28 KB

Here are two quick design proposals:

Claro Blockquote Proposals

ckrina’s picture

I love both of them, thanks @saschaeggi!! If I had to choose though, I'd go for the classical quoted one so we can leave all visual weight & decoration to UI elements that might need vertical lines like groups or tabs.

imalabya’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new252.66 KB
new1.12 KB

Added a patch based on the comment from @ckrina. Attached the screenshot below.

It's a new patch so there is no interdiff.

imalabya’s picture

Issue summary: View changes
StatusFileSize
new1.29 KB
new281.16 KB

New to patch to add RTL support.

ckrina’s picture

Issue summary: View changes
Issue tags: -Needs design
StatusFileSize
new314.93 KB

Thank @imalabya! We discussed @saschaeggi 's design on Slack and agreed on not using bold for the quote itself to visually empathize the quote and use bigger text instead. This way we can still use bold text on a quote.

Here's the design Sascha created:

ckrina’s picture

Status: Needs review » Needs work

Sorry, forgot to change this to Needs work based on the new design.

sakthivel m’s picture

Status: Needs work » Needs review
StatusFileSize
new1.43 KB
new558.9 KB

#16 Please review the patch

saschaeggi’s picture

Status: Needs review » Needs work

The font-size should be 1.25rem
Sorry for not providing any specs yet - I'm currently on vacation 🙈

naveen433’s picture

Assigned: Unassigned » naveen433

I am working on it

naveen433’s picture

Assigned: naveen433 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new675 bytes
new1.43 KB

Find out the changes in attachment patch files

imalabya’s picture

Status: Needs review » Needs work
  1. +++ b/core/themes/claro/css/base/elements.css
    @@ -130,7 +130,26 @@ dl dl {
    +  margin: 1em 3.4375rem;
    

    Let's make it round to 3.5

  2. +++ b/core/themes/claro/css/base/elements.css
    @@ -130,7 +130,26 @@ dl dl {
    +  float: left;
    +  margin: 0.28em 0 0 -0.65em;
    

    Will need a /* LTR */ to specify that this is overwritten

  3. +++ b/core/themes/claro/css/base/elements.css
    @@ -130,7 +130,26 @@ dl dl {
    +  font-family: serif;
    

    I saw it in my patch as well, this is not required

  4. +++ b/core/themes/claro/css/base/elements.css
    @@ -130,7 +130,26 @@ dl dl {
    +  transform: rotateY(180deg);
    

    This will invert the quote mark in RTL

imalabya’s picture

Status: Needs work » Needs review
StatusFileSize
new1.38 KB
new1.61 KB

Added a patch.

chetanbharambe’s picture

StatusFileSize
new236.49 KB
new455.99 KB

Verified and tested patch #21.
Patch applied successfully and looks good to me as mentioned in comment #20

Testing Steps:
# Go to Appearance -> Set Claro theme
# Create a blockquote post in the body
# Save it

Expected Results:
# Quotations should have appeared for the HTML blockquote Element in the Claro theme

Actual Results:
# Quotations are missing for the HTML blockquote Element in the Claro theme

Please refer attached screenshots.
Can be a move to +1RTBC.

kostyashupenko’s picture

StatusFileSize
new1.4 KB
new1.41 KB

Some little clean-up

kostyashupenko’s picture

Not sure what to do with font-family for open-quote icon, coz in different browsers this icon can look differently.

For previous comment try to open it in FF browser for example

Also we can't use `initial` value https://caniuse.com/css-initial-value

Ideas ?

volkswagenchick’s picture

Issue summary: View changes
Issue tags: +Europe2021, +Novice

Tagging for DrupalCon Europe2021 and novice. Thanks

Added Steps to validate/reproduce to summary field.

roshanibhangale’s picture

Assigned: Unassigned » roshanibhangale
StatusFileSize
new220.69 KB
new171.42 KB

Testing Steps:

  1. Install Drupal core 9.2.0
  2. Go to Appearance -> Set Claro theme
  3. Create a blockquote post in the body
  4. Save it
  5. View the post with the Claro theme.

Expected Results:

  1. Quotations should have appeared for the HTML blockquote Element in the Claro theme

Actual Results:

  1. Quotations are showing for the HTML blockquote Element in the Claro theme

Working as expected. Please find the attached screenshot for reference.
Hence this ticket can be moved to RTBC.

roshanibhangale’s picture

Assigned: roshanibhangale » Unassigned
Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/claro/css/base/elements.pcss.css
@@ -109,7 +109,23 @@ dl dl {
+  font-family: serif;

I think we should remove this. I don't see this font in the designs proposed by @saschaeggi.

yogeshmpawar’s picture

Status: Needs work » Needs review
StatusFileSize
new1.36 KB
new862 bytes

Addressed #28

yogeshmpawar’s picture

Moved to Needs Review again for reviewers to review.

dww’s picture

Status: Needs review » Reviewed & tested by the community

#29 fixes #28 (which I also pointed out at #8.4).

Overall, the patch now looks good. This seems slightly weird with 4 significant digits:

+ margin-top: 0.6875rem;

But I guess that's fine. No real harm, I suppose.

Back to RTBC.

Thanks everyone!
-Derek

dww’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new13.67 KB

Hrm, not so fast. Now I'm seeing this:

Screenshot of a blockquote in Claro without a font-family for the quote marks

dww’s picture

Yeah, if we want to achieve what @saschaeggi posted in #10 and confirmed by @ckrina in #14, we need a font-family in here. So maybe the version from #3 is actually better. ;) I don't see the problem that just using font-family: serif; gives different results in different browsers (I tried FF, Chrome and Safari), but it's all on my mac, so that's probably not the best test.

I think maybe #23 is actually the right patch here now. But maybe @lauriii can re-confirm his thoughts in light of these last few comments...

dww’s picture

StatusFileSize
new13.91 KB
new14.48 KB
new13.79 KB

For reference, here's what I'm seeing w/ #23 on Chrome, Firefox + Safari:

Chrome

Claro blockquote with patch #23 in Chrome

Firefox

Claro blockquote with patch #23 in Firefox

Safari

Claro blockquote with patch #23 in Safari

I can't tell the difference. 😉

dww’s picture

dww’s picture

Status: Needs review » Reviewed & tested by the community

Tentatively back to RTBC for #23. Let's see what core committers think now.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

@ckrina @saschaeggi looking at the designs my initial reaction is the with the quote and margin and the font size increase that's a lot of visual emphasis. Are we sure that we should increase the font size as well? I was wondering if the content had multiple quotes and headings whether or not the increase in size would be necessary. I discussed this @lauriii and we agreed to ask this before proceeding with the issue. In isolation it does look nice.

vicheldt’s picture

I also think the font is too big, also is it really a good idea to leave no <"> at the end of the quotation? I think there should be something to show the end of it, like a slightly different background color or maybe the <"> itself so it's clearer for the users. Thoughts?

vicheldt’s picture

StatusFileSize
new23.52 KB
new23.19 KB
new1.31 KB

I added the close quote and it looks like this when i use paragraph
with
and it looks like this when i use break line
without
I tried doing the background color differently but it didn't work as i wish it would so i didn't change that, all these changes i did were based on the patch on #23, not the #29, all i need now is the review and test this on other languages and let me know if the font-size should be different.

saschaeggi’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new489.8 KB

Alright, I've tweaked the design a bit. Reduced the spacings, also decreased the font-size so that it's only marginally bigger.
Also you'll find all the specifications in Figma now:
https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...

Updated quote style

vicheldt’s picture

I still think there should be a close-quote (on a blockquote::after) because it looks incomplete/unfinished, like when you don't put a period at the end of a sentence.

ckrina’s picture

Thanks @saschaeggi! This will accommodate longer quotes as @alexpott, @lauriii and @vicheldt were suggesting. If a user reaches a limit were it looks weird with so many quotes with this design I'd say it's more a content problem rather than a design one. So +1 to this.

@vicheldt thanks for your suggestion. We chose going just with the first quote as a visual indicator instead of 2 in purpose, and use it together with the extra space to indicate what is a quote without loading it too much with visual information. So it's a classic design patter, we haven't missed it. That's why the blue quote element itself is that big: if we were going to use 2 they should go more on line with the text size and color.

Also, @saschaeggi confirmed on the design specs we should use serif as the font size.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

StatusFileSize
new25.49 KB
new27.57 KB

Applied patch #13 in drupal-9.3.x-dev applied successfully
Thanks for the patch ...
For ref sharing screenshot ...

ckrina’s picture

Next step here is to implement feedback from #42.

javi-er’s picture

Status: Needs work » Needs review
StatusFileSize
new1.63 KB
new654.59 KB
new349.36 KB
new3.05 MB
new467.38 KB
new551.83 KB

Hi! Here's a new patch addressing #42 and the new design, it was also necessary to define the close quote even if it's not used, otherwise the browser can interpret the second quote as being inside of the first one.

blockquote::after {
  content: no-close-quote;
}

Before:

After:

The font family for the quotation mark is specified as font-family: "Times New Roman", serif; as it is on the Figma, maybe a --font-family-serif variable should be added to contain this?

saschaeggi’s picture

Visually it looks good now, thanks.
Now just needs a small code review.

ckrina’s picture

Status: Needs review » Needs work

Nice work @javi-er, thanks!! I totally agree with you about the need to define a variable for --font-family-serif so it doesn't get defined in other ways in the future (and in other places). I'd say let's add it as --font-family-serif: "Times New Roman", Times, serif; in the variables.pcss.css file.

gauravvvv’s picture

StatusFileSize
new1.5 KB
new2.18 KB

As per #48, --font-family-serif: "Times New Roman", Times, serif; font family added to variables.pcss.css file, Attached an interdiff for same. Please review.

gauravvvv’s picture

Status: Needs work » Needs review
ankithashetty’s picture

StatusFileSize
new2.21 KB
new1.43 KB

Fixed custom command failure errors in #49 by running tests locally, thanks!

dww’s picture

Thanks for keeping this moving forward, everyone!

Re: patch #51:

+++ b/core/themes/claro/css/base/variables.pcss.css
@@ -49,6 +49,7 @@
+  --font-family-serif: "Times New Roman", times, serif;

Why lowercase times here? Isn't it a proper noun? The other usages in core use "Times". Not sure why this changed here.

Everything else looks good to my eyes. If it weren't for this, I'd RTBC.

Thanks again,
-Derek

ankithashetty’s picture

The test bot on code-check reported the following error:

Checking core/themes/claro/css/base/variables.pcss.css

yarn run v1.22.17
$ node ./scripts/css/postcss-build.js --check --file /var/www/html/core/themes/claro/css/base/variables.pcss.css
[09:19:56] '/var/www/html/core/themes/claro/css/base/variables.pcss.css' is being checked.
Done in 1.42s.

themes/claro/css/base/variables.pcss.css
 52:43  ✖  Expected "Times" to be "times"  value-keyword-case

Do we need to change it back to uppercase times ?

dww’s picture

Status: Needs review » Reviewed & tested by the community

Oh okay. Weird. I wonder why bartik's CSS is okay and this isn't. I guess bartik isn't using postcss so we don't notice or care. /shrug

In that case, I think this is RTBC.

Thanks!
-Derek

lauriii’s picture

StatusFileSize
new2.8 KB

Adjusting credits and uploading Drupal 10 version of the patch in #51.

  • lauriii committed 11fc6f0 on 10.0.x
    Issue #3214124 by imalabya, Sakthivel M, javi-er, vicheldt, naveen433,...

  • lauriii committed f00a121 on 9.4.x
    Issue #3214124 by imalabya, Sakthivel M, javi-er, vicheldt, naveen433,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 11fc6f0 and pushed to 10.0.x. Also committed the patch from #51 to 9.4.x. Thanks!

Status: Fixed » Closed (fixed)

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