- Issue created by @windy-ux
- Merge request !8Fix id and style attributes assigning in layout_custom_section_classes.module β (Open) created by windy-ux
- Status changed to Needs work
7 months ago 11:50am 12 June 2024 - πΈπ°Slovakia kaszarobert
+ $variables["attributes"]["id"][] = $variables['settings']['custom_id'];
I think "id" is usually a single value, not an array since the HTML id semantically should be single value without spaces, see https://www.w3schools.com/html/html_id.asp I'm afraid the best we can do is skipping this operation and not doing anything if id is an empty string.
The style appending seems okay. Although I would strongly encourage everyone to write these styles in the theme's CSS for specific classes and set classes in layouts. It will be much more maintainable that way.
Could you also do this style appending method in region attributes?
Thank you for mentioning the id. I removed that change so it is only one.
I agree with the theme's CSS.
"Could you also do this style appending method in region attributes?"
Do you mean to change the implementation in the way that the styles are appended there as well, not overwritten?- πΈπ°Slovakia kaszarobert
Yes, since we are doing this to the main section's classes and styles, it would be awesome if the same thing would work to the section regions as well (for example, in 2 column layout there are 2 section regions: the 1st and the 2nd columns) if possible. That way the module's behavior would be consistent to both cases.
I have change the implementation to append styles instead of overwriting them.
- Status changed to Needs review
5 months ago 7:33pm 29 July 2024 - π¨πΏCzech Republic milos.kroulik
All the change requests seem to be addressed here.