Live data from Hacker News

Printing Music with CSS Grid

cruncher.ch

21–30 of 89 posts

Re: Printing Music with CSS Grid

#21

This is extraordinary. While JavaScript is needed now, I’d encourage the author to see what needs to be added to CSS to allow a CSS-only solution, and promote it in the CSS community. For example, repeating the clef when wrapping is akin to a sticky table header, and would have more applications than only music. Some CSS notation is wholly new to me: > .stave > [data-pitch^="A"][data-pitch$="5"] { grid-row-start: A5;…

These css selectors are actually fairly common I would say. They were used for querySelector a lot before Angular, React, etc. In addition in current times they are frequently used to grab elements by their data-testid either for jest tests or e2e tests.

Re: Printing Music with CSS Grid

#25
post #9

Earlier quoted context omitted.

But does Lilypond generate responsive sheets? That to me was the coolest part of this (apart from what others have said, the power of modern CSS)

They can be rendered at any size.

A PDF is still not that responsive. Clean HTML/CSS is.

Re: Printing Music with CSS Grid

#29
post #28

CSS grids are quite interesting. I once implemented a furniture designer with it (pure frontend JS, no backend): https://alnvdl.github.io/2023/01/07/designing-furniture-usin...

Hey, that's a great lightweight tool. Thanks for sharing that.

Re: Printing Music with CSS Grid

#30

It's a nifty solution. But speaking as a music engraver, it could use a lot of improvement, and I don't think there's enough tolerance in CSS to make it work. The beams, slurs, and ties, in particular have real problems visually. This is why other methods of getting notation into the browser don't use such tools. You need pinpoint precision for vector rendering, which is why almost all browser notation is done with S…

What is a music engraver? I could google it, but I would appreciate a music engraver actually telling me vs some random page on the internet.
Post reply on HN