Closed dutom007 closed 3 years ago
Why did you do it? You can control the position by css e.g. position absolute. This way options object and the code become more and more complicated.
Hi (too),
I use complex <li>
with flex rules.
When I load your module, the opener are the first block in my <li>
.
If I move and create a sublist the opener are appending and by default the "minus" appear at the end.
I dont understand how flex can disable position absolute. Can you make an example on jsfiddle?
Here an exemple of my li :
<li id="541" class="s-l-closed">
<div class="contener"><span class="s-l-opener" style="float: left; display: inline-block; background-position: center center; background-repeat: no-repeat;"><i class="fa fa-plus" aria-hidden="true"></i></span>
<i class="moving fad fa-arrows" aria-hidden="true"></i>
<div class="clickable allSize">
<a class="loadOnSidebar type_invisible" data-url="mine">Auto Created <i class="fad fa-pencil onlyHover fa-edit" aria-hidden="true"></i></a>
</div>
<div class="clickable">
<a class="loadOnSidebar" data-url="mine" title="Ajouter un menu"><i class="fal fa-plus-square" aria-hidden="true"></i></a>
</div>
</div>
<ul style="display: none;">
SUBLIST
</ul>
</li>
Float element are ignore if parent is flex contener
This does not work?
.contener {
position: relative;
}
.s-l-opener {
position: absolute;
left: 0;
top: 0;
}
Of course, it's work, but must force me to configure margin or padding for other element (or contener) to prevent layering.
With my option, it's automatic.
I use your (great) plugin on multiple page of my admin, sometime I want the "plus/minus" at the end, sometime at the beginning. With my parameter, no need to use CSS rules on contener
As I wrote in the first comment. This way options object and the code become more and more complicated. It can have impact to the speed. Sorry css is the right clean way.
ok ;)
For info :
On my config (in flex li) opener appear at the end if I move item on nexw submenu.
I change :
by
And add option open.position on setting