Hacker News new | past | comments | ask | show | jobs | submit | philo23's comments login

A bit off topic, but on the copying issue with dashes, you can wrap the whole key in a span styled with “user-select: all” to improve the copying experience. Well, on the web at least!


I don't think quite the same kind of tech, but this kinda reminds me of the "3D" pixel art sprite editor thing in Smack Studio

https://youtu.be/sM3ss-lY1zU?t=10


I was just about to post the same link. It is really cool tech and Smack Studio is when I first fell in love with the concept. What Adobe has is cool, but I've seen it already.


In summary, Smack Studio is a fighting game with a character editor that can rotate any 2D pixel art sprite as if it were 3D by extrapolating a depth map. You can export the resulting sprites for use outside of the game.

The game was released on 2024-07-31.


I'm fairly certain this isn't new in macOS 15, I could have sworn I've seen this on 13 + 14


Wow, you're right about macOS 14, or at least macOS 14.7, but not about macOS 13.

The Mac mini in question has macOS 11 through macOS 15 installed on separate APFS volumes. I just tried booting into 14 and 13.

I'm not sure why I never noticed this before on Sonoma. Perhaps it was added in a later minor update, but I have no idea.

I can't reproduce on Ventura.


> However, wouldn't putting the input inside of the label (before the label text) be a better solution

The one potential downside to doing it the way you describe is (assuming the same CSS flexbox layout) now all the white space on the right side of the label acts the same as clicking the radio/checkbox. Which is almost like the opposite problem to the original issue.

This might actually be a good thing for some designs/contexts, but not always. For example, on mobile it might lead to miss-clicks while trying to scroll past the <label>s


That's only true if you let your labels be as wide as the parent container.

> on mobile it might lead to miss-clicks while trying to scroll past the <label>s

You can scroll on mobile by swiping over the text of a label itself without activating the input; this isn't generally a concern.


Well with the CSS in the post they would end up as wide as their parent. If you made it an inline flex box then yes, that wouldn’t be an issue.

> You can scroll on mobile by swiping over the text of a label itself without activating the input; this isn't generally a concern.

Generally speaking yes, but there’s still a chance of triggering it by touching the whitespace by mistake. Whereas if it wasn’t the full width it just wouldn’t be possible to begin with.


border-block (and border-inline) are new ones for me!

Also it might be worth mentioning position sticky on table rows/sections don't work yet in Firefox unfortunately :( but hopefully soon...


Works for me.


Wait until you find out how we used to change the colour of links!


A bit off-topic, and maybe it was just an example made without too much thought put into it, but I've noticed there seems to be a lot of people now who write button/links like this:

    <button><a href="/blah.html">My Button</a></button>
As far as I know that's technically invalid HTML. You can't have an <a> as a child of a <button> (or even the other way around.) I'm also ignoring the invalid type="submit" against the <a> tag in the example button component in the post.

I think it stems from people who want their links to take on the default button styling, but I'm not 100% sure. Has anyone else noticed this trend at all?


> As far as I know that's technically invalid HTML. You can't have an <a> as a child of a <button> (or even the other way around.) I'm also ignoring the invalid type="submit" against the <a> tag in the example button component in the post.

It definitely feels weird to have anything other than text nodes inside <button>, didn't realize it's actually invalid HTML.

I used this approach mainly to have the button component behave as a link button and a form submit button. Here's the actual code from my project - https://github.com/sheshbabu/mouji/blob/master/commons/compo...

What are the drawbacks of this approach? I'm pretty sure I've used this before, can't recall any downsides.


> I used this approach mainly to have the button component behave as a link button and a form submit button.

Personally I think the "proper" way to do this would be use just <a> for links, and <button> for submitting forms, and then have the same CSS styles applied to both so that both <button>'s and <a>'s look the same visually if that's what you're going for.

I'm not particularly familiar with Go, but I'd either make the wrapping tag name itself a template variable (maybe an enum between "Anchor" and "Button"? again not familiar with Go) or have two components one for forms and one for links. If I've understood the syntax, something like this?

    <{{.Tag}} class="button-container"></{{.Tag}}>
But given both <button>'s and <a>'s have lots of different attributes to manage its behaviour and state (name/value/type/disabled vs href/rel/target etc) I'd personally split them into two separate components, even if it ends up doubling up some of the logic and styles.

> What are the drawbacks of this approach? I'm pretty sure I've used this before, can't recall any downsides.

As others have mentioned, while it's technically invalid browsers will still happily accept it so there's no real issue with it, personally I just find it a bit quirky to read. There's no harm in leaving it just as it is :)


It breaks accessibility and semantics. Use a <button> for an action and an <a> for a link.


A button with type "submit" will happily submit the form when you click on it. If you want it to look like a link, use CSS. Putting the submit on the anchor tag is pointless- the lack of a type on the button itself means the browser is inferring the intended behavior and defaulting to type "submit" rather than type "button".

As others have mentioned, the main downside is likely accessibility.


Once the major browser engines support it, it's de-facto legal.

This also explains why there are so few alternative browsers. Writing a new browser that supports everything that happens to work in the major browsers is ridiculously hard.


The big innovation of the html5 spec was to specify how to handle all the “invalid” html states; recovery from user error is now part of the spec instead of wholly implementation specific.


HTML 5's error recovery pseudocode replaced the formal grammar that HTML 4 had, and in authoring I find it harder to take guidance from.


Well, what's the point of having a formal grammar if nobody follows it and things outside the grammar have defined behavior?


Yes, html is one of the unique languages of our era. It's very forgiving and lenient.

> This also explains why there are so few alternative browsers. Writing a new browser that supports everything that happens to work in the major browsers is ridiculously hard.

IMO one of the reasons Chrome won was because they supported both Firefox and IE's interpretation of web standards.


Yep, the HTML5 spec has an agreed on way to parse and interpret invalid HTML, so all modern browsers should handle it pretty consistently.

I was more interested in finding out where this style had come from really, because I've seen a lot of devs doing something similar and semantically it's just always struck me as a bit odd looking!


> Once the major browser engines support it, it's de-facto legal.

thats madness. just because the browser allows it, doesn't mean you should do it.


"Legal" is not the same as "recommended".


Maybe this works on IE6 or something like that?


yeah it is invalid html, and probably done for the ui only. now people are just copying it. would totally break if the button anchor was in a form


I vaguely remember reading about this issue in the past, it’s actually down to the way the software running in the cars radio is using a backwards compatible “iPod” integration. It effectively (against Apple’s recommendations) sends a “play music” signal as soon as you connect your device.

Well behaved radios don’t send that signal immediately, and instead wait for you to hit play on your device, or on your cars radio/stalk.


I think the mention of Steam will be to do with the Steam Link app they released for Meta quest devices fairly recently that lets you stream your VR games from your desktop computer to the quest wirelessly https://help.steampowered.com/en/faqs/view/0E2C-406B-9135-38...


I’m pretty sure macOS does warn you that turning Bluetooth off will disconnect your keyboard/mouse/trackpad, if thats the only input device you’ve got connected.

Not sure when it was introduced but it’s definitely there on the latest version because I bumped into it the other day.


Interesting! If that’s the case, great! But I believe the couple in question is on an older iMac not upgradeable to the latest version of macOS, so they would still be out of luck.


Never thought of this but this sounds like the kind of thing that would happen to me right before an important meeting.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: