- Issue created by @pivica
- Status changed to Needs work
about 2 years ago 6:17pm 13 February 2023 - 🇷🇸Serbia pivica
Here is a first patch.
Tests needs to be added for this.
- 🇨🇭Switzerland miro_dietiker Switzerland
Is this inheritance already applicable with the example styles that we offer in the collection?
Does this work similarly to styles or once more a bigger difference?
One thing that i learned with isolated components is that duplication is a feature. If you derive work from an original layout, you don't get accidental changes. This adds freedom to evolve the original, without fear to break things. Drupal core exactly decided for this approach with theming: copy instead of subclass a base theme.
Maybe, to still know what the original was, a property could make sense, to display a warning that the styles might need update after a major change in the original... But without inheritance.
You choose the base layout related to grid count, with a variation for vertical alignment. Does the base has no vertical alignment definition or the inherited overrides it? How about other aspects like responsiveness modifiers?
For me, looking at a single layout definition without going to the parent, is less abstraction and more simple to review. For instance also, it's way easier to grep "where is modifier x in use?".
So let's assess of this really improves maintainability in real life scenarios.