Better HN
topnewbestaskshowjobs
Log inSign up

jacobr

5,743 karma · joined Mar 2, 2011 (15y ago) · 676 submissions

specialization is for insects

jacob@jacobrask.net https://github.com/jacobrask http://twitter.com/jacobrask

Gothenburg, Sweden.

Submissions

1.

From building websites to playing Bartók, Pope Leo XIV is reimagining the papacy(thelettersfromleo.com ↗)

1 points · by jacobr · 1y ago · discuss

comment 1y ago · link · parent

Could the next-gen version control system just store ASTs? Does this already exist?

Every user gets their own preferred formatting, and linters and tools could operate on already-parsed trees

3.

Add PUT, PATCH, and DELETE to form method attribute(github.com ↗)

4 points · by jacobr · 1y ago · 1 comment

comment 2y ago · link · parent

You can even benefit from the default messages if you want that, grabbing `input.validationMessage` and rendering it as you wish.

5.

Evidence of dark oxygen production at the abyssal seafloor(nature.com ↗)

2 points · by jacobr · 2y ago · discuss

6.

How to Downsize a Transport Network: The Chinese Wheelbarrow(solar.lowtechmagazine.com ↗)

3 points · by jacobr · 2y ago · discuss

7.

Disappearing Polymorph(en.wikipedia.org ↗)

2 points · by jacobr · 2y ago · discuss

comment 2y ago · link · parent

Any article about rebase is incomplete without the mention of `git commit --fixup fb2f677`. When committing you usually already know which commit you’re “fixing” so you specify that.

Then you run `git rebase -i --autosquash origin/main` instead and the commits are already in the right order.

comment 2y ago · link · parent

```

const $ = document.querySelector.bind(document);

$('.box').hidden = true;

$('.box').hidden = false;

```

comment 2y ago · link · parent

"The concrete description of what is going on here is spread atom-thin across several websites, all of which expect you to know the terminology. Each of these websites provides you with a tiny piece of the puzzle and you are expected to combine it together on your own."

Oh how I unironically love these types of quests.

comment 2y ago · link · parent

There's a shift though, just the last couple of years. Today all browsers support native modals with the dialog element, accordions with details/summary, everything but Firefox supports popovers (dropdowns, tooltips, menus, etc) in plain HTML.

I'd honestly love to be a beginner again learning modern HTML and CSS today, it's not bad at all.

12.

Styling with Classy CSS (2006)(thedailywtf.com ↗)

123 points · by jacobr · 3y ago · 67 comments

comment 3y ago · link · parent

It’s built in to VS Code, see editor.foldingImportsByDefault.

14.

Harmony: Accessible UI Color Palette(figma.com ↗)

2 points · by jacobr · 3y ago · discuss

comment 3y ago · link · parent

Yes, the biggest drawback of Tailwind is React. Or specifically, relying on components as the mechanism for style composition.

16.

Death of Garry Hoy(en.wikipedia.org ↗)

1 points · by jacobr · 3y ago · discuss

comment 3y ago · link · parent

External css files are render blocking, meaning any content after a <link rel=stylesheet> will not be visible until the css has been loaded.

comment 3y ago · link · parent

Looks a bit like tire inserts - basically foam rings you put inside the tire, common on mountain bikes. I just installed that on my bike, which not only protects my rims but also lets me ride home from the trail with a flat tire. https://www.bikeradar.com/advice/buyers-guides/best-tubeless...

comment 3y ago · link · parent

Because it’s easier to just not use lodash.

20.

React Is Holding Me Hostage – A love and hate relationship(emnudge.dev ↗)

2 points · by jacobr · 3y ago · discuss

21.

The case for frameworks(seldo.com ↗)

154 points · by jacobr · 3y ago · 88 comments

comment 3y ago · link · parent

Unfortunately none of that works with the feature in TFA because it’s not supported by Declarative Shadow DOM.

comment 3y ago · link · parent

I hear you. I think Shadow DOM is very useful for a handful of roots on your page, encapsulating third-party widgets or DOM-heavy components like a nested navigation.

Custom Elements on the other hand are useful for attaching behavior to HTML, sort of like jQuery plugins.

Not at all sold on the frameworks promoting using Shadow DOM for every button or whatnot.

comment 3y ago · link · parent

For example, encapsulating a third party widget, cookie banner or your main navigation. That way any CSS added inside the shadow DOM only affects those elements - you can safely write selectors like `h1` or `button` and they’ll only match what’s inside that same shadow root boundary.

comment 3y ago · link · parent

Almost all examples of Shadow DOM uses Custom Elements, but that’s not required. I think this conflation harms adoption of Shadow DOM.

As an example of what you can use the Shadow DOM for - it works fine as the node to render a React app/component in. So if you need a couple of React components on a page to not affect each others style, you can do React.createRoot(myShadowRoot) and they’re fully encapsulated.

26.

Therac-25(en.wikipedia.org ↗)

7 points · by jacobr · 3y ago · discuss

27.

In 1945, a Japanese Balloon Bomb Killed Six Americans in Oregon (2019)(smithsonianmag.com ↗)

4 points · by jacobr · 3y ago · 1 comment

comment 3y ago · link · parent

Isn't a shared BFF an oxymoron, considering that you typically build a BFF specifically for one client and its needs? Maybe you just have a backend :)

comment 4y ago · link · parent

SSR was mentioned though.
12345
23