You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by parkercode98 June 6, 2023
This is too complex to write a whole issue on, but just thought I'd mention that the new drawer CSS selectors in 3.0.0 are causing a few issues that could be changed. Most of it has to do with removing the .drawer-mobile from v2 and changing the way .drawer-end affects the positioning.
v2
The grid-column-start of the .drawer-content was added via this selector:
This worked in v2 because the .drawer-mobile class (that was in the #r2 classList) specifically set the grid-column-start of the .drawer-content to 2 (at #c2).
Now in v3, the .drawer-end class is setting the grid-column-start to 1 for the .drawer-content (#c2), causing it to be positioned on the left side instead of the right like it would be when using .drawer-mobile in v2.
Anyway, I most likely could be structuring or doing this in a better way, but in any case, It might be a good idea to add a pseudo (:not) selector to all the .drawer-end selectors in v3 so that it doesn't affect the positioning of the .drawer-content when it's nested inside another .drawer element.
Something like this might help other people from running into the same issue ⬇️
Changing this:
Discussed in #1933
Originally posted by parkercode98 June 6, 2023
This is too complex to write a whole issue on, but just thought I'd mention that the new drawer CSS selectors in 3.0.0 are causing a few issues that could be changed. Most of it has to do with removing the
.drawer-mobile
from v2 and changing the way.drawer-end
affects the positioning.v2
The grid-column-start of the
.drawer-content
was added via this selector:And in the case of the
.drawer-end
class on the parent (root) element, the direction was reversed, so it's positioned correctly:Then inside with the
.drawer-mobile
class, the grid-column-start of the.drawer-content
was changed to 2 in every case:v3
In v3, the grid-column-start of the
.drawer-content
is added via this selector (taking into account the.drawer-end
class):This is fine because now it doesn't need to use the selector in v2 to reverse the direction in the case of
.drawer-end
:This is great, EXCEPT when you have something like this:
The Problem
In my case, I wanted both a left and right drawer, so I did something like this:
This worked in v2 because the
.drawer-mobile
class (that was in the #r2 classList) specifically set the grid-column-start of the.drawer-content
to 2 (at #c2).Now in v3, the
.drawer-end
class is setting the grid-column-start to 1 for the.drawer-content
(#c2), causing it to be positioned on the left side instead of the right like it would be when using.drawer-mobile
in v2.Anyway, I most likely could be structuring or doing this in a better way, but in any case, It might be a good idea to add a pseudo (:not) selector to all the
.drawer-end
selectors in v3 so that it doesn't affect the positioning of the.drawer-content
when it's nested inside another.drawer
element.Something like this might help other people from running into the same issue ⬇️
Changing this:
To this:
The text was updated successfully, but these errors were encountered: