Live data from Hacker News

Things I wish I’d known about CSS

cssfordesigners.com

231–240 of 340 posts

Re: Things I wish I’d known about CSS

#231
post #215

Earlier quoted context omitted.

I've been earning a bit on a regular basis since I published it 1 year and a half ago. Not enough for replacing a salary, but enough as side pocket money. I'm lucky to have a decent following, so I didn't have to market it a lot. I'm currently writing a second one which is longer and more advanced, so hopefully it will earn me a bit more.

Thanks for the reply! Do you have any practical tips you may want to share? Maybe how did you grow your audience, how you wrote your book (technologies, etc.)?

Well I grew my audience on Twitter by building open source projects. [1] I didn't really plan or aim for anything. It mostly happened.

As for technologies, I just wrote the book in markdown using Sublime Text. Then I used a markdown-to-pdf library from GitHub to generate my ebook, and voilà. Nothing fancy really.

[1]: https://twitter.com/jgthms

Re: Things I wish I’d known about CSS

#232
I love reading these articles because it is a win-win:

1. If I already know the tidbit, I give myself a pat on the back

2. If I don't know the tidbit, yay, I learned something.

Someday I'll be 100% in the #1. What got me in this article "ch" size.

Fact: the heigh/width calculation has changed over the years. It is likely this article captures the final method, let's hope so.

Re: Things I wish I’d known about CSS

#233

Earlier quoted context omitted.

I'm sure in terms of money, working in the US as an IT person is a good deal. But you have to think not only about you but also the others. I don't know whether you have children or grandchildren , but if you do I'm sure knowing that they will never have a bad situation is pretty nice. You can't expect all your children and grandchildren to have a well paid job and you can't finance all of them forever.

Workforce mobility means people can always move for a system that makes more sense for them. If grandpa was a good IT engineer and made some nice money in US, but the grandchild is the village idiot then moving to Germany or France is a solution. Germany has an open door policy to foreigners (there are millions of Turkish descendants of "guest workers" invited after WW2 for reconstruction), East Europeans and now "re…

Well if your child can't make it in USA, s•he will not make it in Europe either. You can't just land in France and become a citizen without a job.

But do you want your child to immigrate because you live in a country of selfish people? I'm sure you would find the situation difficult.

By the way, the communities you are mentioning in France are French since a few generations and not foreigners.

Re: Things I wish I’d known about CSS

#234
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…

Cobbler here, currently cobbling a frontend (am a backend dev by trade). The issue for me is the format these courses and resources take. CSS is the most jam packed with non-intuitive technology I've met. How many dozens of pages or segments of video would I have to go through in a course to learn what the author in OP summarised in two or three sentences? Any time I've considered the structured approach for somethin…

Your evaluation is problematic.

I am a front-end dev by trade and I could really easily say similar things about the tech stack you work with daily.

If you want a good reference and a learning guide start with this: https://developer.mozilla.org/en-US/docs/Web/CSS it is what us professional use.

For us professionals that use CSS in our jobs, that have put the same amount of hours into front end technology as you have done for back-end, CSS is a perfectly cromulent technology. It is easy to work with, it is intuitive, it is easy to find a good reference (go to MDN not random blog posts from people that are admittedly not masters of the craft).

If I try to cobble together a back-end I expect to be frustrated with it, I expect not to be able to do everything, I expect I’d need to find poor example and try to hammer them in to fit my needs, I don’t expect to be able to understand all the example snippets. Why are you on your high horse judging my tech stack this way?

If you need a good well crafted front-end for your project, you should hire a professional front-end developer. Or find a friend who is one that is willing to it in their spare time. Or spend a few thousand hours learning and mastering the craft. Alternatively you can cobble together a good-enough front-end that works, just don’t complain about how hard it is because “technology hard wheee wheee”. Us professionals use it every day and are fine with it.

Re: Things I wish I’d known about CSS

#235
There are couple of things that author still don't get.

display:inline means that element does not establish a box. Such element is rather a collection of individual content boxes (e.g. glyphs). These boxes can be placed on different lines (text wrapping) and so on. As no element box as no margins and paddings applied to such elements.

img element (and input and other replaced(^) elements for that matter) is not a display:inline but rather display:inline-block. Even you will define them as display:inline they will be treated as display:inline-block and so e.g. margins will apply to them.

(^) representation of replaced elements (img,input,textarea,iframe,etc.) is outside the scope of CSS - they are always treated as solid boxes.

Re: Things I wish I’d known about CSS

#236

Earlier quoted context omitted.

Dear lord it's 2020 CSS has its own grid system, it's CSS Grid, and it's both easier to understand and more flexible than adopting the old frameworks. It also has variables, pseudo-selectors (which, like with html elements, you can invent new ones to suit your purposes), and more.

Is creating your own pseudo-selectors really possible? I like to think I'm pretty up to date on modern CSS but I've never heard of this.

I might be wrong but I think GP is talking about shadow parts[1]

    my-element::part(custom-selector) {
      /* ... */
    }
1: https://developer.mozilla.org/en-US/docs/Web/CSS/::part

Re: Things I wish I’d known about CSS

#237

Earlier quoted context omitted.

In the United States, you can spend 6k on health insurance and 12k out of pocket for unlimited family health care. So as long as a US job pays 18k more, it's pretty similar. People talk about vacation, but my job pays so much I'll take months off between contracts. (Engineering) Also it's hard to compare lifestyles in the US vs Europe. Homes in the US are gigantic, often newish, and have Air Conditioning. Cars in the…

> In the United States, you can spend 6k on health insurance and 12k out of pocket for unlimited family health care. Where? How? I... this total is about what I’m seeing for shit-tier covers-nothing insurance. Like, there are plans out there that are HCA non-conforming and not that far under $18k/year just for the premiums. Who do I talk to to get total max healthcare spending of $18,000 without an employer-provided…

Just ran some rates in my area for an EPO with reasonable copays and zero co-insurance:

$3,600/yr individual, $0 deductible, 8k OOPL

$9,600/yr self + spouse + kid, $0 deductible, 16K OOPL

$12,000/yr self + spouse + 2 kids, $0 deductible, 16K OOPL

Although I don't really think it makes sense to compare costs based on OOPLs. For most people, the deductibles, coinsurance, and copays are much more relevant to actual costs.

Re: Things I wish I’d known about CSS

#238

Earlier quoted context omitted.

Workforce mobility means people can always move for a system that makes more sense for them. If grandpa was a good IT engineer and made some nice money in US, but the grandchild is the village idiot then moving to Germany or France is a solution. Germany has an open door policy to foreigners (there are millions of Turkish descendants of "guest workers" invited after WW2 for reconstruction), East Europeans and now "re…

Well if your child can't make it in USA, s•he will not make it in Europe either. You can't just land in France and become a citizen without a job. But do you want your child to immigrate because you live in a country of selfish people? I'm sure you would find the situation difficult. By the way, the communities you are mentioning in France are French since a few generations and not foreigners.

One can live in Western Europe on welfare. Most of my colleagues in France are not born in France, they are foreigners. The trend is growing in Germany too, in our department there is no German in Germany but people from Brazil, India or Eastern Europe.

Re: Things I wish I’d known about CSS

#239

Earlier quoted context omitted.

Last year. Around November and 91% unprefixed usage ( https://caniuse.com/#search=display%3Agrid )

CSS Grid has only been widely supported for a couple years now. Not so hard to believe a frontend dev was still using bootstrap grid.

I agree. It's fairly common for experienced front end devs who have been bitten by browser incompatibilities in the past to wait several years to adopt the latest CSS techniques. The "old techniques" often work very well.

Most likely if you had asked me "why flexbox and not CSS grid" I would have said "because flexbox is able to perfectly well support this use case, and I'd rather not introduce a dependency on a less well supported CSS feature unless I need to".

I personally tend to prefer using the oldest (within reason) CSS feature that lets me accomplish a task. Or I'll pick the one that best conceptually maps to the task I'm trying to accomplish, if there's a significant difference.

Re: Things I wish I’d known about CSS

#240

Earlier quoted context omitted.

If you wrap an image in a figure, but leave the image still inline, you’ll probably get a few pixels of extra space at the bottom of the image due to line-height and vertical-align. People find that really confusing. With how most people use images, I agree that `img { display: block; }` is what you want >99% of the time, and would rather people reverse it for the rare occasion when they want something else. (BTW, do…

I’m confused by your reply. Did your eye skip over the word “not” in my comment?

Sorry, you are correct. Drop the final parenthetical, then, but I stand by the rest.
Post reply on HN