Hacker Newsnew | past | comments | ask | show | jobs | submit | systoll's commentslogin

The CSS Object Model.

HTML comments are basically just a HTML tag that isn't rendered. Tools that 'compile' the HTML code into a document tree, including browsers, preserve comments as nodes without any extra effort.

CSS comments can go anywhere:

    /*wow*/ .selector /*x*/ {animation /*z*/: 2s /*z*/ linear /*z*/ bounce;}
Tools that transform/parse CSS can either: 1. Strip comments before parsing, meaning anything based on the parsed version will lose the comments. 2. Dedicate a disproportionate amount of complexity to retaining the comments, and still not really have a good way to handle them through edits/transformations.


But if it's valid CSS it has to be representable in AST/object model? It's a comment, it can't have any child nodes, it doesn't depend on anything - pretty trivial. And if it's in the tree you can transform it with proper tools. If you are transforming CSS you have to write a proper parser and not just a bunch of regexes

EDIT: also why is it useful to have comments in the object model in the first place? To access them from js?


Round-tripping to CSS and keeping information that may be useful to the user if they would inspect the content I would presume.

A similar issue is CDATA in XML which is not retained when round-tripped. Very annoying, but in line with the spec.


His podcast with Louie Mantia in July was pretty clear with it, though it also suggests why he’s given significant criticism of the design direction, but mostly just has quips and shade thrown at Alan Dye on the blog:

> I get to ask Alan Dye about [the shadows on Apple Watch faces]. And he was like, oh, we render a shadow? And I was like, oh, you never even looked. I just instantly realised he’d never really even looked at it. Like, somebody at Apple has, but Alan Dye didn't. […] It just suddenly came to me, oh, he doesn't do the job I thought he did.


This is silly.

Sketchfab clearly notes the original file format when you download a model, and lets you choose between it and various other converted formats. [Example: https://imgur.com/a/himJBfG ]

Blender doesn't fully support the USDZ format, causing the issues the author sees. [Source: https://docs.blender.org/manual/en/latest/files/import_expor... ] If the creator uploaded a USDZ file, downloaders would likely to run into similar issues.


A script tag would be able to call setHTMLUnsafe, bypassing whatever sanitation you configured.

I’d’ve made it a runtime error to call setHTML with an unsafe config, but Javascript tends toward implicit reinterpretation rather than erroring-out.


Seems like most AIs generate the hiking boot emoji, and accept that as being a hiker emoji.

If you specifically tell it not to do that, you get hints of similar behaviour to OP, but I can't get it to go totally off the wall: https://chatgpt.com/share/68e348dc-be68-8001-8ec8-41eba4bf22...


The entire idea that numbers would be treated on a character by character basis rather than as numbers is somewhat intuitive for developers and not for non-technical people.

The answer to all of those questions is no for lexicographic ordering. Lexicographic ordering leads to surprise and confusion as a result.

> It's like a feature request that initially sounds reasonable and useful but once you explore the requirements in detail you realize there are too many edge cases to be able to meet the request in a non-brittle way.

It's been on windows and macOS for coming up on 25 years, and is in practically every modern UI. It’s reasonable.


If you can start from any arbitrary different point, you can just start from the point you’re intending to reach, and don't need to break any other rules.

As per FIDE rule 3.10.3 "A position is illegal when it cannot have been reached by any series of legal moves". The position isn't legal per FIDE rules.

Beyond there being too many queens… black could not possibly have made the last move. For white to have any moves right now, the last move must have been black moving the king to H8. But G8, G7, H7 are all occupied, so where could the King have moved from?


Legality is a long standing term of art used by chess problem creators. Essentially it means a position withtwo kings on the board, non touching, and not both in check. And no pawns on first or eighth ranks. It has nothing to do with whether the position is reachable from standard chess rules. Along came FIDE in 1999 with its standardized nomenclature but that doesn't invalidate the terminology used by chess problem creators in their own work.


I don't disbelieve you but… where?

I don't think I’ve ever heard it used like that, and in trying to find any example other than the page we’re commenting on, I’ve only found counterexamples.

Whether it’s wikipedia’s 'Glossary of Chess Problems' or OzProblems or 'Sam Loyd and his chess problems' from 1913, they’re all using 'legal' as synonymous with 'reachable'.


What does making a different choice for GUI and CLI apps achieve, other than making it impossible to ever have a single coherent place to look/synchronise/etc?

XDG's spec doesn't make such a distinction, so you’re advocating for a new competing standard.

I don't think Apple’s documentation intends to cover command line programs, but… in the absence of any concrete rule, putting your files where most programs on the system do is a reasonable choice, and that place will never be ~/.config/ on macOS.

Apps like homebrew that default to the library but support XDG_CONFIG_HOME if explicitly set, are a decent compromise, though.


Control+F4 - ‘move focus to the active or next window’ is essentially that. (With the caveat that if your keyboard focus winds up on the menu bar or otherwise not on a window at all, control+f4 shifts focus back to the window, rather than switching windows. The main way to make that happen is with the other control-f-key shortcuts that no-one uses, though)

If you’re going to use it I’d probably rebind it in the keyboard shortcuts settings.


Doesn't seem to work for me, it looks like it cycles through all open windows instead of the most recently active window.


Based on all this is does seem like there's a 'missing' option to only swap the fonts when they’re off-screen, which avoids:

1. blocking first-paint 2. 'flashes' of anything 3. Not showing the font at all.

A quick mockup: https://codepen.io/pjwdev/pen/ByoLJoR

(This is an intentionally bad fallback. If it were Georgia the effect would be a whole lot more subtle.)


Neat trick. For the sake of the demo, it's easier to visualize by putting a little background color in .offscreened

Any layout change from the font changing off-screen still causes the scroll bar to jump around and change size.


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

Search: