(please do not commit - to be used (maybe) for a live commit at dev days)
Suggest commit message:
git commit -m 'Issue #2470137 by tadityar, zaporylie, pec, LewisNyman, ry5n, Bojhan, yoroy: Style Seven'\''s fieldset elements'
Problem/Motivation
Seven's fieldset elements are unstyled, see the screenshots in #1493324: Inline form errors for accessibility and UX
Proposed resolution
Implement the styling from the styleguide https://groups.drupal.org/node/283223#Fieldset
In #2002336: Introduce a CSS class to hide borders of fieldset elements we introduced a class called fieldgroup that unstyles fieldsets which means we can use fieldsets for accessibility without affecting the visuals.
Previously all fieldsets had margin styling even if they had the fieldgroup class applied.
This patch removes margin styling from fieldsets with the fieldgroup class in Seven. This does not cause any visual regressions because that the fieldsets with the class fieldgroup also had the class form-item which applies margin styling that overwrote the fieldgroup margins so they never applied.
Remaining tasks
Style fieldset elements
Download and install vijaycs85's Errorstyle module from https://github.com/vijaycs85/errorstyle and go to /error-style/form
to test a fieldset
add before and after screenshots to the issue summary
User interface changes
Fieldsets look nicer!
API changes
None
Before:
After:
Beta phase evaluation
Issue category | Task because styleguide implementation |
---|---|
Issue priority | Normal priority because it' an isolated incident, we don't use fieldset elements that often in core. |
Unfrozen changes | Unfrozen because it only changes CSS |
Comment | File | Size | Author |
---|---|---|---|
#23 | Screenshot 2015-04-16 18.40.45.jpg | 275.35 KB | LewisNyman |
#21 | Screenshot 2015-04-16 11.08.12.jpg | 778.98 KB | LewisNyman |
#21 | Screenshot 2015-04-16 11.07.13.jpg | 816.69 KB | LewisNyman |
#16 | style_seven_s_fieldset-2470137-16.patch | 653 bytes | zaporylie |
#13 | Screenshot 2015-04-14 17.46.18.jpg | 264.79 KB | LewisNyman |
Comments
Comment #1
tadityar CreditAttribution: tadityar commentedWorking on this
Comment #2
tadityar CreditAttribution: tadityar commentedInitial attempt.
Somehow I can't get the "Source Sans Pro" font to work and thus still confused on how to get this one semibolded and from the screenshot 15px/24px is too small for the legend. Any suggestion on other size?
Comment #3
LewisNymanThere are some differences between the original proposal and in implementation. It wasn't so simple to add the webfont to core. See: #1986082: Add a webfont version of Source Sans Pro font
Because we don't have the same font, we can't use the same font sizes as the proposal. I would try using 1em instead.
Also:
There is an empty line here that we need to remove
Are these changes related to this issue?
Comment #4
tadityar CreditAttribution: tadityar commentedFixed #1, yes #2 is not related to this issue.. accidentally got there :)
New screenshot attached.
Comment #5
tadityar CreditAttribution: tadityar commentederr.. I edited the wrong file sorry
Comment #6
LewisNymanLooking good! Thanks.
We should replace this selector with fieldset:not(.fieldgroup) because we introduced this unstyled class in this issue #2408481: Rewrite help.module component's inline with our CSS standards
We should remove this font-family declaration
Comment #7
tadityar CreditAttribution: tadityar commentedComment #8
LewisNymanExcellent! I had a look at this patch applied and I think the padding on the left and right need to be tweaked.
Instead can we use something like:
padding: 30px 18px 18px;
After that we are 100% good.
Comment #9
LewisNymanTagging novice because the remaining task is simple enough for someone to work on at Drupal Dev Days
Comment #10
pec CreditAttribution: pec commentedHi, this is my first try at contributing to drupal for this drupaldevdays mentoring sprint.
I think this should be ok.
Comment #11
keyral CreditAttribution: keyral commentedComment #12
LewisNymanComment #13
LewisNymanThis looks good to me! Thanks
Comment #14
alexpottI think we need a space after
legend
Comment #15
zaporylieWill fix it.
Comment #16
zaporylieBumping it back to RTBC.
Comment #17
LewisNymanRTBC++
Comment #18
LewisNymanUrgh sorry, back to RTBC
Comment #19
zaporylieyeah... I left it RTBC since change was so small.
Comment #20
alexpottDoesn't this change the
.fieldgroup
margins. Was that intended?Comment #21
LewisNymanGood catch. Funnily enough it doesn't. The margins never applied to fieldgroups because it was being overridden by
form-item
. I'm happy to havefieldgroup
as a completely unstyled class, and letform-item
handle spacing for consistency.Before:
After:
Comment #22
YesCT CreditAttribution: YesCT commenteddiscussed at dev days
Comment #23
LewisNymanComment #24
LewisNymanI've added a suggested commit message to the top of the issue summary that includes credit to the original designers of the Seven style guide:
git commit -m 'Issue #2470137 by tadityar, zaporylie, pec, LewisNyman, ry5n, Bojhan, yoroy: Style Seven'\''s fieldset elements'
Comment #25
alexpottComment #26
alexpottCommitted a1717dc and pushed to 8.0.x. Thanks!