Nesting media queries in non-media query
I see https://developer.mozilla.org/en-US/docs/Web/API/CSSNestedDeclarations#css does this, but "CSSNestedDeclarations" is only supported by less than 50% of browsers. (https://caniuse.com/mdn-api_cssnesteddeclarations)
Is it ok to put a media query inside the declaration block of another regular selector?
or do I need to seperate them?
16 Replies
depends... do you care about ios users?
and do you care about users that didn't update the browser in the last month?
Lol probably
then use scss if you want to write like that
and use the nesting
or just don't use nesting until about next year
Whoops I didn’t know nested media queries are not well supported ! I have some refactoring to do…
i was surprised by it too
I've spent so much time today writing css
How do I stop stuff from going off screen? (Using flex, at least on the 1st one)
normally looks like this
I was going to say something about how :focus wasn't acting right on https://xan.nekoweborg/, unlike on https://xansnh.neocities.org/, but appling this css fixed it
oh no, but that css reset code also breaks this table layout element
or use a tool like lightningcss?
if it is supported by vite, yes
update: fixed it through a lot of work
but still don't know how to stop flexbox contents from overflowing
not everyone uses vite bruh
i know, but if you have a plain html website, using vite is the best option
that depends on what is overflowing and how and why and at what resolutions
you can add this to your css, to check it:
* {outline: 1px solid red;}
this way, all elements have an outline, and you can see which outline is going outside the viewport
DO NOT CHANGE IT TO BORDER!!! borders cause changes on the size of the elements