Live data from Hacker News

New.css – A classless CSS framework to write modern websites using only HTML

newcss.net

31–40 of 192 posts

Re: New.css – A classless CSS framework to write modern websites using only HTML

#32
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 websites using only HTML

#33
post #25
post #18

It might be just me but I can't look at websites with black backgrounds and white or yellow letters. My eyes hurt and when I turn my head elsewhere I can see shadows of the website for a bit. I use dark(ish) themes everywhere but such high contrast somehow is too much.

i have exactly the same issue. so many websites nowadays choose to have dark themes which are essentially black backgrounds with white text and it is physically painful to read. if i'm invested enough in the article, i always try to change the user styles a bit to make it more bearable.

Yep, exactly. Last ditch resort is to modify the values via devtools myself but usually I just skip that site.

Re: New.css – A classless CSS framework to write modern websites using only HTML

#35
post #31

This Github repository tracks a whole bunch of these drop-in CSS files: https://github.com/dohliam/dropin-minimal-css And you can use this demo site to switch between them all on the fly: https://dohliam.github.io/dropin-minimal-css/

Seeing all these styles, I can't help but get the feeling that we're heading towards the aesthetic minimalist ideal of mixed text media.

Re: New.css – A classless CSS framework to write modern websites using only HTML

#36
This reminds me of W3C Core Styles[1]. I remember using those in many quick pages to make them look somewhat presentable without spending any effort myself, when perfect styling just wasn't important. I wonder how many sites nowadays use their styles directly from their URLs.

[1] https://www.w3.org/StyleSheets/Core/

Re: New.css – A classless CSS framework to write modern websites using only HTML

#37
post #15

This looks more like an attempt at criticizing the bloat people add to their websites basically just to change the font from Times New Roman. I can't really see this competing with bootstrap, since it lacks all the custom components.

I don't think so. This is criticizing no one. Right tool for the right job.

I write web apps which need real frameworks.

I also write basic text pages, and something like this is very nice. It's a dying art (university professors seem like the last hold-outs), but it's often handy.

The top comment gives a list of such frameworks, though, many of which look nicer than this one.

Re: New.css – A classless CSS framework to write modern websites using only HTML

#38
post #20

This looks to be using the new css variables (well, new to me - I was checking on the state of the art in css just recently). I was looking into how you can do components now and this stuff looks pretty interesting, though styling of nested components using these techniques looked a little...hairy. Has anyone used these in anger? https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_c...

I used CSS custom properties (AKA variables) when rewriting my blog's frontend just recently. A few issues come to mind even when using the latest CSS features:

1. Nesting can still be an issue if you have complicated layouts. You can mostly get around this with good use of classes/IDs.

2. Custom properties cannot be used in media queries. This was my biggest problem, because you now have to repeat your breakpoint sizes in every place you want to use media queries (which is many places if you split your code into many files), or you can have one file with the breakpoints set a bunch of custom properties that are used then throughout the styling. But the latter method falls down if you need to use e.g. `display: grid` for one size and `display: block` for another -- you end up with tons of properties. An example of that in my blog's code [1].

3. I really missed the lighten/darken helpers from SCSS. Those would have been useful with all the colors, because now I'd have to calculate all of them again if I wanted to change the color scheme.

[1] https://gitlab.com/Nicd/mebe-2/-/blob/f0f988e3d120c4cff54277...

Re: New.css – A classless CSS framework to write modern websites using only HTML

#40
post #15

This looks more like an attempt at criticizing the bloat people add to their websites basically just to change the font from Times New Roman. I can't really see this competing with bootstrap, since it lacks all the custom components.

It's obviously not meant to compete with Bootstrap.
Post reply on HN