Within Olivero's `text-content` class (which gets applied on formatted text), we apply special styles to pre
and code
elements. Furthermore, if they're nested under a narrow layout (like article content), we will stretch them out to take up more horizontal space (similar to what we do with blockquotes and the article's image). We need to control the stretching at various screen widths to make sure it fills up the optimal space -- and that is where the bug is.
The first bug appears in both Drupal 9 and Drupal 10:
Between 700px and 1000px screen width the code blocks do not take up enough space
The second bug only occurs in Drupal 9 (because of the way that Drupal 9 manages variables)
At larger than 1440px, the code block width will grow in relationship to the viewport width (It shouldn't)
Comment | File | Size | Author |
---|---|---|---|
#3 | 3280985-10.0.x.patch | 1.14 KB | mherchel |
| |||
#3 | 3280985-9.4.x.patch | 3.27 KB | mherchel |
drupal-9-code-block.gif | 6.94 MB | mherchel | |
drupal-10-code-block.gif | 6.77 MB | mherchel |
Comments
Comment #2
mherchelComment #3
mherchelFixes attached.
Comment #4
andy-blumLGTM!
Comment #9
mherchelFollowup issue: #3283391: Olivero: "Wide image", blockquote, code blocks create horizontal scrolling when toolbar is in vertical mode and open
Comment #11
lauriiiCommitted c1efe4c and pushed to 10.0.x. Also committed to 9.5.x and cherry-picked to 9.4.x and 9.3.x since this is a straight forward bug fix in Olivero. Thanks!