Problem/Motivation

Note: top is on Mac OS X/Chrome and bottom is on Mac OS X/Firefox (on larger screens). If I squish the Firefox window to smaller width -> the QEON radio button becomes visible.
Steps to reproduce
Install Webform module -> then add Element of type radios:
area:
'#type': radios
'#title': Area
'#options':
1: AB/NWT
2: AC
3: BC/Y
4: CSO
5: QEON
6: MB/SK/WO
'#options_display': three_columns
'#required': trueDocumenting this here. Happy to provide more info and/or test possible patches. I'm seeing this on 9.1.x - I'll bump another site to 9.2.x to see if the issue is present there.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3225138-with-column.png | 530.07 KB | pradipmodh13 |
| #16 | 3225138-solution.png | 572.07 KB | pradipmodh13 |
| #16 | 3225138-default.png | 214.03 KB | pradipmodh13 |
| #9 | Screenshot 2021-09-15 at 10.38.05.png | 29.46 KB | aaron.ferris |
| #9 | 3225138-webform-radios-display-issues-9.patch | 1.24 KB | aaron.ferris |
Issue fork drupal-3225138
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
karingIt looks better in 9.2.2 -> but it's still very squished and the top of the radio is chopped off. If we remove the display: inline as highlighted here in this image it looks great on both Firefox and Chrome!
Comment #3
andy-blumI'm not able to replicate this issue on mac OSX in chrome or safari with 9.3.x at any zoom level.
Can you try using the latest development branch and see if the problem still occurs?
Comment #4
karingHi Andy, if I look at your screenshots (e.g. the third one you uploaded - ending in 4.14.55) -> the radios are very tight and are overlapping/cut off when selected: let me embed it here:
PS -> if you remove
display: inline-> I think you'll find the radios to be spaced better vertically [perhaps a bit too much line height - but no more cut offs]Comment #5
mherchelHaven't tested it out, but I wonder what styles are applying if
display inlineis not set.I do agree that we could use some vertical padding to allow space for the offset outline.
Comment #6
xjmHm, not sure what to think about this one. On the one hand, modules like Webform should make sure they work with Olivero, at least once it becomes the core theme. On the other, though, the screenshot where the radio button disappears is really bad; that would be a major bug.
@KarinG Does this happen in Bartik?
Splitting the difference at "Normal" for now.
Comment #7
karing@xjm -> here's Olivero (top) and Bartik (bottom). Olivero looks WAYYYYY better - even with the radio buttons a bit crowded and slightly overlapping.
Comment #8
aaron.ferris commentedThis is defined in the webform css in
webform.element.options.cssIn particular
However, this is mainly becoming a problem because of the additional styling around radios that we have in Olivero.
I'm also seeing the focus state with a cropped border radius (on radios other than the first child), some padding top and bottom might solve both problems.
Comment #9
aaron.ferris commentedSomething like the attached which seems to solve this particular use case.
It does feel a bit weird to be using webform specific classes (and breakpoint!) in Olivero however
Edit: its worth noting I cannot recreate all the issues from the original post (such as parts of the radio button appearing in the wrong column)
Comment #10
aaron.ferris commentedComment #11
kostyashupenko@aaron.ferris i think it's wrong idea to write styles for webform's based selectors inside of Olivero, because webform module is a contrib module. Olivero theme can't and shouldn't fit all contrib modules. Here is reversed logic -> contrib modules should make sure they work fine with Olivero.
But still, maybe somehow possible to fix described issue from Olivero theme without references to webform module, i dont know.
My initial thoughts are the following:
1. If described problem happens really often to several contrib modules / cases not related to drupal core -> maybe then we can write a little bit more styles inside of Olivero to fit all those. A little bit more styles means additional styles, which will overlap module's styles so we will never meet described problem, because it can be universally fixed from Olivero theme.
2. If problem happens only to Webform module and nowhere else -> for sure better check webform module and provide fix from there, instead of touching Olivero.
Comment #12
aaron.ferris commentedI don't think it's possible to avoid the webform specific classes, the issue arrives when radios are stacked into webform columns (possibly any column?). I believe radios by default are stacked into rows, at least from my limited testing anyway.
Agreed however it feels weird for webform references in Olivero, I indicated as such in my comment.
Comment #16
pradipmodh13 commentedHello, @kostyashupenko.
You are correct. The gap between two radio buttons works great with a single column, however when we set two, three, or five columns, the spacing is removed by webform CSS.
We can get our layout space and active radio button will not overlap by eliminating margin-bottom css.
So we should edit webform CSS rather than the olivero theme file.
Please see the following screenshot for reference.
@all
Please suggest me how can I submit the patch of webform contrib module. ?