Display property is broken for different viewports

I have been working on a div as a menu with other divs inside to get it responsively. I wanted to make some divs set to display:none at less than 768px. i also tried to make the div using grid and then i saw that the divs doesnt show up, although the class and ID shows display: flex and not none. Then i changed from safari 16.0 to Firefox Dev Edition, and there it worked fine.