- Issue created by @Grevil
- ๐ฉ๐ชGermany Anybody Porta Westfalica
@Maintainer: This is a potential breaking change and we're not sure if it's really a bug or intended behavior, but seems a bit strange that both elements have the same class. Still these are different HTML elements, so might be expected and by design.
Feel free to close this "by design" if it's correct. We just saw that same class in code on both elements.
- ๐ฉ๐ชGermany lrwebks Porta Westfalica
I just saw that this is only the case when using the โSmart Trim Client Side Formatterโ introduced in โจ Allow selecting client-side or server-side trimming Active , where this issue is already noted, so we can only start looking into this once the other issue is done.
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Let's wait for maintainer feedback, I think this is by design and expected. Nothing to do here or over there IMHO.
- ๐ฉ๐ชGermany lrwebks Porta Westfalica
This behavior is also implemented here: https://git.drupalcode.org/project/smart_trim/-/blob/2.x/src/Plugin/Fiel..., which is why I reused this existing logic for the less wrapper class in โจ Allow selecting client-side or server-side trimming Active .
I agree with @anybody, that we should wait for maintainer feedback first, but this also looks prone to errors to me.
- ๐ฎ๐ชIreland lostcarpark
The class gets added to the
<a>
link here, and as @lrwebks says above, then gets passed to the template as#more_wrapper_class
.The class is then added to the wrapper
<div>
here.It definitely doesn't seem right that the same class gets added to both. A workaround for sites using Smart Trim would be to override the template, and only use
$more_settings['class']
to set the class of the<a>
link, and set a different class for the<div>
in the overridden template.I do think we want to avoid adding too many additional paramaters, as providing the template allows the output to be modified in more flexible ways.
I'm wondering should we apply a class to the
<a>
link at all, since it can be pretty easily be specified in CSS by.class-name a
, but as @anybody says, that could be a breaking change for sites relying on it.Agree we should wait for input from @markie or @ultimike.