Closed drupol closed 1 year ago
Please have a look at the section in the book where alternatives
is explained. It also shows why we need all this measuring and boxing behaviour. It's just what alternatives
is there for.
I do see that their might be the need for other utilities that just strictly exchange content without boxing it. We can discuss this in a separate issue.
Thanks for the clarification.
If you want, I could update the PR and add an argument to alternatives
: updateLayout
(or something else), set to true
. When set to false, this would not wrap the content. WDYT?
On another subject and while working on this, I also noticed that using citations @<something>
doesn't work when using alternatives
. I couldn't find the reason.
I'd prefer separate functions. As I said, let's discuss further things in separate issues. The citing thing is new to me.
Hi,
I'm working with a custom theme for work and have encountered an issue when using the
alternatives
helper on a focus slide. Specifically, usingalternatives
ends up breaking the layout, making it difficult to incorporate into my work.The Issue
When I use
alternatives
, thecontent
gets wrapped in abox
element with specificwidth
andheight
attributes. I find this to be problematic for a utility helper, as it alters the layout in an unexpected way.Proposed Solution
I've opened a PR that proposes a fix for this issue. The PR removes the
box
wrapping around thecontent
, thus eliminating the layout modification. I believe utility helpers likealternatives
and alike should strictly implement specific logic without affecting layout.I've been using this fix in my own work and haven't encountered any issues so far.
I'd love to hear your thoughts on this. Do you share the same vision that utility helpers like
alternatives
should not modify the layout?Your feedback would be highly appreciated.