6 ms·
I know responsive design is important in a mobile-first world. But the grid systems I've seen (mini.css; it's my first web project in 15 years and I've decided
by thanatropism 8y ago
I know responsive design is important in a mobile-first world. But the grid systems I've seen (mini.css; it's my first web project in 15 years and I've decided not to use frameworks, just bash rocks together until the browser talks and listens to an API server) are nooot great.
They're significantly wordier than old school tables, and significantly more confusing to write by hand too. The one good thing is that they shrink with window size.
I know I shouldn't be coding up web "apps" by hand and instead learn React or whatever, but why should the whole making webpages an active hurdle for a techy person of average intelligence who can e.g. move some of his custom code from numpy to tensorflow?
Maybe I didn't google the right things, but I expected something that allowed me to say "div id=topnavbar" or something. As opposed to a lot of width classes that...
Next thing you know I'm not allowed to repair my TV despite having had a short protoboard-electronics hobby in my teens. I jest.
- chickenfries 8y agoJust use bootstrap if you just want something that is simple and just works.
- ergothus 8y ago> But the grid systems I've seen They may have been referring to the new(ish) CSS Grid https://css-tricks.com/snippets/css/complete-guide-grid/ https://css-tricks.com/snippets/css/complete-guide-grid/ I've not used it yet myself, but it looks to work well enough for at least top-level grids. Your description of other grid systems is accurate, both of those and frankly of most advanced CSS in my opinion. (Cue someone saying "It's easy, you just apply these 3, 5, or 20 CSS properties that you knew applied because of dark magic, and It Just Works!) > wordier than old school tables, and significantly more confusing to write by hand too The issue with old-school tables was never that they didn't work or even were hard to write. The issues (beyond the issues of effective obfuscation of data and accessibility) were that they didn't handle revision well at all. Nor modularity, for that matter. > I know I shouldn't be coding up web "apps" by hand and instead learn React or whatever There are bitter haters on all sides, but the practical truth hasn't changed: template libraries make sense when you start to code solutions to the same problems they solve, or at least encounter those problems. If you aren't encountering those issues, they have little to offer. > Maybe I didn't google the right things, but I expected something that allowed me to say "div id=topnavbar" Unless you use some built in setup (mini-css, bootstrap, foundation, etc) and accept their limitations, you're left to write that all yourself. > Next thing you know I'm not allowed to repair my TV despite having had a short protoboard-electronics hobby in my teens. You seem bitter that some downgrade of experience has been forced upon you - it hasn't. Just because there are new best practices and preferred alternatives to old best-practices, doesn't mean the old ways stop working. You have more options today, not fewer. If you don't like those options, keep at them. I myself am happier with the newer options over not having them, even if I think CSS is STILL way too obtuse and makes simple things difficult. Many old practices are not best practices for reasons. But no one is forcing your hand.
- z3t4 8y agoI still hand write everything in html css and make progressive enhancements. I like layouts that are still readable if you turn off css and javascript, using meaningfull/semantic html. I do like a lot of the stuff that have been added to css, it makes my life easier. So i suggest starting out with just html5, then do the fancy stuff in css. One line of css can usually replace what you needed 20 lines of javascript to do before. Html and css are lagging far behind though eg. You cant define how a json file should be rendered using just html and css. Thus all the frameworks like React to close the gap. If possible though keep things simple enough that you dont have to rely on heavy javascrip.
- 9935c101ab17a66 8y agoEven tools like react still require you to write the CSS by hand, so they wouldn't really make it any easier for you. You might actually find the proper CSS grid layout module does a lot of what you want: https://www.w3schools.com/CSS/css_grid.asp https://www.w3schools.com/CSS/css_grid.asp Someone else in this thread posted a link to this site which looks pretty good for getting a gist of the basics: https://www.w3schools.com/CSS/css_grid.asp https://www.w3schools.com/CSS/css_grid.asp I think that your experience is valid, but it's worth considering that in the days where we used tables for laying things out, we didnt worry about responsive design and people generally didn't design things to work with so many different viewports with significantly different aspect ratios. Basically, mobile devices have made it much, much more difficult to implement consistent design experiences on the web. Also, I haven't used mini.css, but if you're looking for some CSS libraries that make your life easier, I really really like tachyons: https://tachyons.io https://tachyons.io. It takes a little while to become familiar with the classes, but almost all the classes are super easy to scope for media queries. Another slightly more verbose option in a similar vein is tailwind.css: https://tailwindcss.com/docs/what-is-tailwind/ https://tailwindcss.com/docs/what-is-tailwind/ If you are at all interested in learning a little bit of react, create-react-app makes it really, really easy to get started. In the past, getting a react/js project set up and configured was a real pain, but create-react-app handles all of the config for you, and is a pretty great tool: https://github.com/facebook/create-react-app https://github.com/facebook/create-react-app I'm no expert, but if you have any specific questions about any of this, I'll do my best to point you in the right direction!