Next.js Discord

Discord Forum

Shadcn inline CSS logic

Answered
Jboncz posted this in #help-forum
Open in Discord
Avatar
Im attempting to rebuild my sidebar using the shadcn library as a starting point. Im having issues when it moves into 'mobile' mode.
Image
Answered by Jboncz
I figured it out. Had to use the group functionality on the SheetContent section to expose it to items down the chain.
Image
Image
View full answer

4 Replies

Avatar
When I attempt to use data-mobile in the css for some reason im not getting it to return anything. Very low level example attached, this way of css is new to me, looking for suggestions or pointers in the right direction.
Image
the group-data-[collapsible=] works like a charm which is in the non-mobile view of the side-bar.
Image
Avatar
@Orinoco Crocodile Because we have talked CSS before and I know your pretty proficient, you have any idea how to go about this? 😅
Avatar
I figured it out. Had to use the group functionality on the SheetContent section to expose it to items down the chain.
Image
Image
Answer