Opened 5 years ago
Last modified 5 years ago
#42847 new defect (bug)
Twenty Seventeen: Social Menu creates code bloat
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.8.3 |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
Theme: Twenty Seventeen
Version: current
The theme has an option to make a social menu.
The Bug
When using the social menu, 150+ lines of code (svg defs) are rendered in source code just above the closing body tag. This code is bloated with all the icons not selected, i.e. about 146 lines not needed when only two icons used.
Steps to replicate:
Add one or more custom links (Facebook) to social menu. Then look at rendered source code.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Looked into this a bit, and seems the SVG defs are always loaded, not only when a social menu is being used. This is because the svg icons are used for more than just social, a couple of examples are the search widget submit button and the left/right archive page arrows.
Reading up on
<defs>
a bit, this might not really be an issue.Source: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs