Live data from Hacker News

Things I wish I’d known about CSS

cssfordesigners.com

321–330 of 340 posts

Re: Things I wish I’d known about CSS

#321

I believe that focal point of CSS understanding is that horrible display property. People just need to get that one as other stuff is relatively trivial. display:xxx on some elements defines three things ( sorry, that is terrible architectural mistake authors of CSS have made initially ) 1. display defines "sibling requirement" how that element wants to be replaced among its neighbors. `div {display:inline-box}` tell…

I find your comment about `display: inline | block;` interesting, because when implementing the visual formatting model layout algorithm, these are the first two you'd want to implement, and they're the easiest.

In my game engine, we only support these two display types from the specification.

Re: Things I wish I’d known about CSS

#322

Earlier quoted context omitted.

That's a radically misleading comment. It covers much more than layout, and the free content on the site is incredibly helpful and compelling. The full version more than justifies its price. And they offer it for free to students or anyone else for whom the cost is a problem (relying on the honor system). It's far and away the best resource on CSS I've encountered in my 22-year career working with web technology for…

not that the free thing is relevant but from https://every-layout.dev/blog/you-pay/ "The honour system is now closed" > That's a radically misleading comment. It covers much more than layout Given the site and all 3rd party reviews just mention layout, how is it misleading? Cant find TOC anywhere? Also, found working discount code 'BRANDEMIC' for 60% off in my travels should any1 bite the bullet. prev hn sub/182 comm…

Ok,I missed that the honor system closed recently - but they continue to give it away freely to students or those facing hardship, on request.

The focus of course is on layout (by far the hardest part of CSS to get right), but it's in the context of building up your entire UI from robust, composable, accessible, standards-compliant, profoundly well-engineered primitives, based on first principles -- which principles are clearly articulated and demonstrated in the site.

It also covers typography (IMO by far the best explanation I've encountered of _why_ to use a typographic scale as the foundation of your design system), as well as touching on things like web components, shadowDOM, custom properties.. . and providing a deeply-expert perspective on the relative merits of utility classes (a la Tailwind et al), among other approaches.

I've been working in web-related roles for a living for over 20 years and have never once encountered a CSS-related resource that was this compelling and useful.

"Can't find TOC"? Um, it's in the site's primary navigation, in the left column. Literally impossible to miss.

I paid the full $100 and was glad to do so. The authors aren't popular (they've clashed on twitter with some big-name FE people like MDalgleish) but their ideas and body of work are unparalleled, and that's what I support.

If I were more selfish I might try to keep my newfound FE superpowers [axiomatic css and composable layout primitives are transformational] a secret, but I find myself wanting to spread the word and support https://every-layout.dev every chance I get.

Re: Things I wish I’d known about CSS

#323
post #162

Earlier quoted context omitted.

Yes. There are different philosophies for how to write CSS, but assuming you're aiming at something like BEM (Block, Element, Modifier) style, it's typical to start with a reset of the raw elements into a standard form, and then follow that with the CSS for you class components, and finally some !important override utilities. Basically all the CSS philosophies agree that you should never use #id selectors at all and…

Ignore all above is you are not keen to go the path of cargo-culting. Most of those philosophies were brought to you by people who were too lazy to learn CSS.

If you think BEM was created by people who don’t know CSS you may want to read https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect first.

Re: Things I wish I’d known about CSS

#324
post #178

Earlier quoted context omitted.

Wow, that's just crazy to me. It makes sense with the much stronger safety net, it's just a shock. How does rent and food costs compare to America, do you know?

I'm in Scotland, my salary is about £45-£48k. I take home about £31k. The median salary here is about £21k nationwide. I bought my home for £170k, now worth about £230k. it's a decent sized apartment in a nice area in the city where I work. For an indication of size, my living room is about 23ft by 28ft, 2 bedrooms, 2 bathrooms. Some photos to show what I got for my money: https://imgur.com/gallery/6oNLRtl My outgoin…

This is a nice looking apartment!

Some perspective on the costs that look "scary" for the people outside of the USA. I'll share some personal data based on my 20 years since moving here. I have started with $60K and now I am making close to $250K. All this time I was living in a median cost area (one of the top 20 US cities, east coast).

My average effective tax rate over the last 20 years is 19.6% (this includes federal, state, social security and medicare taxes)

My average medical expenses for a family of four are at 3.6% of my gross salary (includes health/rx/dental/vision insurance premiums and out of pocket expenses)

I've paid cash for my oldest child's education at top 10 public university - ~1.5% of my earning over the last 20 years. I am expecting to pay similar cash amount for my other child.

We live in a 4000 sqft McMansion near the best public schools in the state. My mortgage is ~$820 at 2.5% APR

It does look like your effective tax rate is 31-35%, which is more than my all-inclusive rate of ~24.7%

Re: Things I wish I’d known about CSS

#325
post #126

It always helped me to do an absolute basic concepts course on a new technology I learn. Like, sure I can play around in Photoshop or Eclipse or CSS or JavaScript and find most things. But a good 101 course is worth so much saved time. Most of the stuff in that article was mentioned in a CSS box model course I did 10 years ago. People were always baffled how I learned all this. Well, I read the docs! They always assu…

After spending years learning on the job, I started reading the documentation books cover to cover, and I have never looked back. Colleagues are often amazed at my "deep knowledge" of the technologies I use, however I mostly know what is written in the manual. It baffles me that people can't be bothered to read the documentation and at the same time complain that "X is too hard! Let's use Y instead!"

There's a reason RTFM was so prevalent, and we need to make it so, again.

Re: Things I wish I’d known about CSS

#326
If you are really in need of getting a best result about your credit report am using this opportunity to introduce you to this Notorious, Wonderful and Bankruptcy Problems Solver Hacker. You will never get to know until you give him a trying space to prove him self and let his job speak, He help me hack my FICO score and also help me with some adjustment on my Report too. all you need is e-mail EAGLESPYHACKER@GMAIL.COM you’ll be guided to your success destination.

Re: Things I wish I’d known about CSS

#327
post #126

It always helped me to do an absolute basic concepts course on a new technology I learn. Like, sure I can play around in Photoshop or Eclipse or CSS or JavaScript and find most things. But a good 101 course is worth so much saved time. Most of the stuff in that article was mentioned in a CSS box model course I did 10 years ago. People were always baffled how I learned all this. Well, I read the docs! They always assu…

After spending years learning on the job, I started reading the documentation books cover to cover, and I have never looked back. Colleagues are often amazed at my "deep knowledge" of the technologies I use, however I mostly know what is written in the manual. It baffles me that people can't be bothered to read the documentation and at the same time complain that "X is too hard! Let's use Y instead!"

Same here. I tried finding a book about deb and rpm packaging the other day and couldn't find one. Left me feeling anxious.

Re: Things I wish I’d known about CSS

#328

It feels like HTML and CSS could be useful for print layout, but I’ve rarely seen a high quality PDF renderer. I know Atom’s markdown preview uses headless chrome under the hood. These are hugely heavyweight tools but the output is very high quality. Are there any other recommended tools for going an HTML route, for typesetting? I’d much rather design pages that way than use InDesign, PDF scripting, or TeX.

Modern CSS technologies such as grid are convenient for laying out webpages. But there can be no “high quality PDF renderer” from HTML/CSS. The result will always look as crude as a web page. In order to produce a high quality document, you need a sophisticated line breaking algorithm such as that deployed by TeX or some other software.

It is possible to use CSS to have justified text with hyphenated line breaks. Font technology like Opentype will manage ligatures etc. I feel like the basics of laying out glyphs are all there.

What doesn’t feel so great is page filling, and knowing how to break sections so that one doesn’t have a new section at the bottom of a page with only a few lines of text.

Re: Things I wish I’d known about CSS

#330
post #153
post #126

It always helped me to do an absolute basic concepts course on a new technology I learn. Like, sure I can play around in Photoshop or Eclipse or CSS or JavaScript and find most things. But a good 101 course is worth so much saved time. Most of the stuff in that article was mentioned in a CSS box model course I did 10 years ago. People were always baffled how I learned all this. Well, I read the docs! They always assu…

I'm kinda curious how the long term viability of these strategies look. Intuitively I think that reading the docs will become less and less viable as there are more and more available technologies and they become more and more featured. But I'm not fully convinced. Maybe it can keep working by only teaching the most important subset.

There is a learning method that hasn't been mentioned in this thread. Namely, a middle ground between pure cobbling and pure theory. In addition, you have to find a method that is optimal to you.

For myself, that's a feedback loop where bugs during cobbling naturally present themselves as theory questions needing an answer, rather than practical questions needing a solution.

It is rare to find documentation of such high quality that grasping the fundamental abstraction does not require theory-attentive debugging.

Post reply on HN