Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with container of item is width:0px #108

Open
STU-DESIGNER opened this issue Jan 24, 2023 · 1 comment
Open

issue with container of item is width:0px #108

STU-DESIGNER opened this issue Jan 24, 2023 · 1 comment

Comments

@STU-DESIGNER
Copy link

display: flex;flex-direction: column;place-content: stretch flex-start;flex: 1 1 0%;/* width: 0px; */gap: 10px;

Removing width 0px; Fixed my issue. had to remove the width to fix this


useEffect(()=>{
        const data = document.querySelectorAll('div[style="display: flex; flex-direction: column; place-content: stretch flex-start; flex: 1 1 0%; width: 0px; gap: 10px;"');
        console.log(data)
        if(data){
            data.forEach((item)=>{
                (item as HTMLElement).setAttribute('style', 'display: flex; flex-direction: column; place-content: stretch flex-start; flex: 1 1 0%; width: 100%; gap: 10px;')
            })
        }
    },[document.querySelectorAll('div[style="display: flex; flex-direction: column; place-content: stretch flex-start; flex: 1 1 0%; width: 0px; gap: 10px;"')])
@AlexEnache98
Copy link

Hey @STU-DESIGNER While your solution does the job at first sight it doesn't work for safari because the selector becomes a bit different, A solution that i found for all browsers is to
.post__responsive > div > div { width: 100% !important; }

where the post__responsive in my case is the className applied on the ResponsiveMasonry component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants