A bug in libraries-override #2451411: Add libraries-override to themes' *.info.yml → makes it difficult to override a library or library asset that has already been overridden. You have to know the theme which last overrode a library and then use the full path to the overriding theme asset. This presents a WTF to themers and makes it difficult to reuse theme code. It also makes the sub-theme dependent on the internal file structure of the base theme.
In normal circumstances overriding an already overridden library would be and edge case, but with the introduction of the Stable base theme, a lot of system libraries have already been overridden. This also implies that possible future changes in the asset file structure of Stable could break sub-themes that override libraries already overridden by Stable.
The current workaround is explained in #2642122-4: Overriding already overridden libraries-override requires knowledge of previous libraries-overrides → and #2642122-18: Overriding already overridden libraries-override requires knowledge of previous libraries-overrides → .
1. Fix the bug so that the libraries-override declaration should use the same keys as the libraries declaration in the original libraries.yml file.
2. Maintain a BC layer so that themes that have already used the workaround will not break immediately. Remove the BC layer in D10 (
#2852314: Remove BC layer for libraries-override that is already overridden →
)
Reviews
Commit
None
Method signatures of 3 protected methods in LibraryDiscoveryParser
are changed
None.
Needs work
11.0 🔥
Last updated
It involves the content or handling of Cascading Style Sheets.
Enhances developer experience.
A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.