recentpopularlog in


« earlier   
CSS Tip: Star Selector Not That Bad
Clearly, the biggest concern any time you drag-out the universal selector is performance. As you might expect, the universal selector instructs the browser to select every element in the page, which can (theoretically) be a drag on performance. Furthermore, intuitively, as developers, we're trained to assume "*" anything is both lazy and bad. The reality with CSS is actually different, though. Mr. Performance Steve Souders put CSS selectors to the test in 2009 and discovered that they actually have relatively little impact on page render time. In "real world(ish)" scenarios, with thousands of DOM elements and CSS rules, even known "slow" selectors like child and decedent are not that much slower than "baseline" direct element selectors. With this evidence in mind, I ran my own tests. […] In my tests, I am looking for relative change from the "No CSS" baseline to see if the * selector has any meaningful impact on page rendering time. The absolute values are irrelevant. Tests in-hand, I put Chrome (22), Opera (11.6), IE8, iPad 3, and even Kindle Fire through the battery of tests. I didn't test more browsers because the results we're plainly consistent. In every case (including devices), the universal rule had no meaningful impact on page rendering time.
css  webdev  benchmarks  blog-posts 
2 days ago by mikael
* { box-sizing: border-box } FTW
You might get up in arms about the universal * selector. Apparently you’ve heard its slow. Firstly, it’s not. It is as fast as h1 as a selector. It can be slow when you specifically use it like .foo > *, so don’t do that. Aside from that, you are not allowed to care about the performance of * unless you concatenate all your javascript, have it at the bottom, minify your css and js, gzip all your assets, and losslessly compress all your images. If you aren’t getting 90+ Page Speed scores, it’s way too early to be thinking about selector optimization.
blog-posts  css  benchmarks  browser  webdev 
2 days ago by mikael
Long-Lived macOS
As anyone will tell you, thirty isn’t really that old an age for a person. But for an operating system, yeah, thirty is pretty old. iOS and Android, the last two to take the world by storm, are only just over ten years old now.
history  apple  osx  blog-posts 
7 days ago by mikael
Apple's New Proprietary Software Locks Kill Independent Repair on New MacBook Pros
“There’s two possible explanations: This is a continued campaign of obsolescence and they want to control the ecosystem and bring all repair into the network they control,” Kyle Wiens, the CEO of iFixit, told me on the phone. “Another is security, but I don’t see a security model that doesn’t trust the owner of the device making much sense.”
business  hardware  apple  asshole  blog-posts  repair 
12 days ago by mikael
Smarter Link Underlines For Every Website
Marcin Wichary from Medium recently wrote a similar post on this topic, which I highly recommend. This post summarizes an expansion on his work, particularly as it relates to this comment thread on text-shadow.
css  webdev  blog-posts  typography 
14 days ago by mikael
Another warning: Don't convert your Time Machine volume from HFS+ to APFS
There’s no advantage to using APFS on hard drives, and the filesystem isn’t ready for (or maybe will never come to?) Fusion drives that pair an SSD and hard drive for affordability, so I reiterate my advice: don’t upgrade drives manually to APFS.
filesystems  apple  osx  backup  blog-posts 
15 days ago by mikael
Using @font-face
Things are shifting heavily toward WOFF and WOFF 2, so we can probably get away with:
@font-face {
font-family: 'MyWebFont';
src: url('myfont.woff2') format('woff2'),
url('myfont.woff') format('woff');
css  typography  fonts  browser  webdev  tutorials  blog-posts 
16 days ago by mikael
HTML vs Body in CSS
So we should always put global styles on <html>, right?

It's tempting to think that any styles we want to be inherited across the board should be applied directly to <html> because it is the root element of the document. <html> supersedes <body> in hierarchy, so it follows that it must contain all global styles.

But that's not exactly the case. In fact, inline attributes for the following were originally assigned to <body> in the spec:

css  html  tutorials  blog-posts 
21 days ago by mikael
To close or not to close
Well, for those of you who are really addicted to X(HT)ML, you might think, «yeah, it’s optional, but <br /> is still ‘more correct’», but I have to tell you: it is not. Actually, one might argue that adding / to a void tag is an ignored syntax error. The possibility to write it has mostly been added for compatibility reasons and every browser and parser should not handle <br> and <br /> any differently. Google’s styleguide on that subject is also very clear that you should indeed not close void tags.
html  html5  webdev  blog-posts 
29 days ago by mikael

Copy this bookmark:

to read