Closed (won't fix)
Project:
Seven
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2017 at 22:05 UTC
Updated:
10 Sep 2025 at 04:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
aubjr_drupal commentedComment #4
aubjr_drupal commentedFixed for failing tests
Comment #5
aubjr_drupal commentedComment #6
aubjr_drupal commentedComment #7
aubjr_drupal commentedComment #8
phenaproximaNice idea! This could certainly be beneficial to themers who are trying to extend Seven's styles. I gave this a quick review, and had a few thoughts. I'm also tagging this for front-end framework manager review because I'm not even sure this can be committed, as it might constitute a BC break. Also, a framework manager will be better equipped than I to find any problems with the approach.
While these changes do improve readability tremendously, they do not appear to be adding or removing anything, so unfortunately I think this chunk should be reverted because it's out of scope. :(
This sentence should probably be reworked. Something like "Adds alternating odd/even classes to nested fieldsets."
$element['#parents'] can be set arbitrarily, and we can't be sure that all of the parents are fieldsets. Therefore, I'm not sure that this code is "trustworthy". Maddeningly, I'm don't have any ideas off the top of my head about how to get around that, but I thought I'd annoyingly point it out anyway. This function would benefit from a reliable, dedicated helper function to determine the number of *fieldsets* above the element in the render array's hierarchy.
I'm not intimately familiar with Seven's theme functions (especially in D7), but this seems like a copy-paste of theme_fieldset(). It might be preferable here to just call theme_fieldset() directly to reuse its code path as much as possible, rather than copy its code.
Comment #9
phenaproximaOne more thing...
We probably shouldn't change the color here, since that change is probably also out of scope. Sorry! :(
Comment #10
phenaproximaAlso, some before/after screenshots would help review.
Comment #11
phenaproximaComment #12
xjmThanks for posting this patch, @aubjr_drupal!
I discussed this issue with @Fabianx (Drupal 7 framework manager) and @lauriii (Drupal 8 frontend framework manager). We probably wouldn't want to make this change in Drupal 7 at this point since it could disrupt other subthemes of the Seven theme.
We could consider the change for Drupal 8 in a minor release, since the Seven theme is considered internal API in Drupal 8. Reference: https://www.drupal.org/core/d8-bc-policy#themes (Improvements need to be made in Drupal 8 first regardless according to the backport policy: https://www.drupal.org/core/backport-policy)
So, I've moved this issue to 8.x in case we're interested in making a similar improvement in D8's version of Seven. It'd of course need a different patch and screenshots would still help reviewers. :)
Thanks again for sharing your improvement with the Drupal community!
Comment #13
effulgentsia commentedI don't know if it makes sense to do anything here for Drupal 8. In Drupal 7, the Seven theme has this CSS in its
style.css:This patch wants to genericize that to nesting/depth levels beyond 3.
In Drupal 8, even these two levels were removed. First, #1168246: Freedom For Fieldsets! Long Live The DETAILS. converted many
fieldsetelements todetailsand therefore changed these selectors todetails detailsanddetails details details. And then #1838114: Change node form’s vertical tabs into details elements removed even those selectors.I'm curious what the use cases are for high levels of
fieldsetand/ordetailsdepth, both in Drupal 8 and in Drupal 7. So +1 to screenshots, especially of real cases that you've run into.Comment #23
smustgrave commentedSince seven has been removed from D10 I'll move to the contrib
Don't believe any theme in D10 is currently having this issue.
Comment #24
avpadernoComment #25
avpadernoComment #26
avpadernoComment #27
avpadernoThe patch is for Drupal 7.
Comment #28
anchal_gupta commentedI have check the according to issue branch its properly updated the D10 version no need to reroll the patch and branch files.
If have any doubt and I am missing something please let me know.
Thanks
Comment #29
avpaderno@anchal_gupta No commit has been done in the existing issue fork.
Comment #30
avpadernoI agree with effulgentsia: Drupal 8+ does not require the changes proposed here. Therefore, I am closing this issue.