News for hackers. Stuff that matters.
Re:New.css – A classless CSS framework to write modern websi... by onion2k on Monday May 18, 2020 @06:30AM (#23220638)
It doesn't work properly. The body has a max-width of 750px, and the header uses a padding hack of 'calc(50vw - 50%)'. That 50% means '50% of the containing element', so if 50vw is more than 750px (eg your viewport is more than 1500px wide) the header element stops being centred and starts spilling over on the right hand side.
Re:New.css – A classless CSS framework to write modern websi... by Dragory on Monday May 18, 2020 @08:29AM (#23221474)
Seems to work properly in Firefox (https://i.imgur.com/AQ2M1G3.png) but breaks in Chrome (https://i.imgur.com/U2tVg2k.png); Chrome doesn't accept the margin value (https://i.imgur.com/pH7X0ZO.png).

When the margin works, the logic makes sense. 50vw sets the padding of the side in question (e.g. left) to the middle of the screen, 50% subtracts half of the containing element's width (<body>) from it. Doing this for both left and right and then negating it with equal negative margins results in the content area in the header being centered and having the same width as body, but the padding stretching out to the edges of the window.

Re:New.css – A classless CSS framework to write modern websi... by Finster on Monday May 18, 2020 @09:15AM (#23221891)
There's already a PR to fix this, looks like there's a missing space after one of the minus signs.
Re:New.css – A classless CSS framework to write modern websi... by emagdnim2100 on Monday May 18, 2020 @12:07PM (#23224227)
A good place for the under-appreciated CSS ‘clamp’ function!
Re:New.css – A classless CSS framework to write modern websi... by onion2k on Monday May 18, 2020 @05:10PM (#23228412)
... that doesn't work in Safari or iOS, or non-Chrome Android browsers yet.
Re:New.css – A classless CSS framework to write modern websi... by horsawlarway on Monday May 18, 2020 @08:16AM (#23221362)
Yeah... Looks terrible for me.