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

cool demo

they do get warm. some programs such as Apple Compressor seem to cap GPU usage to 50% even when cold. but e.g. ffmpeg spikes up temp

same here, but linking to the screenshots used for pixel diffing, which get committed to the repo.

https://github.com/ericfortis/mockaton/tree/main/pixaton-tes...


Not sure I follow the scenario this would solve.

For instance, currently you can conditionally change a parent based on its children. For example, this `pre` could either have 16px or 0px of padding. Zero when its direct child is a `code` element.

  pre {
    padding: 16px;

    &:has(> code) {
      padding: 0;
    }
  }

tbh, this started as a connection of two disparate ideas ("hey, this thing looks like this other thing"), and then just kind of explores it in different directions.

I think the conclusion (which I may not have made clear enough) is less like "These are limitations of modern CSS which ought to be fixed" and more "Maybe a CSS-like syntax could be added to a Datalog-like system and that would be helpful for making it more accessible to more engineers, navigating tree-shaped data, etc"

thanks for the feedback, anyway!


The article describes a syntax for modifying the underlying data (adding new child elements or attributes to the DOM) for matching selectors, not resolving style changes in a single pass like you've shown.

I suspect they are replying to this part of the article: "What you actually want to say is: “an element is effectively-dark if it has data-theme=”dark”, or if it has an effectively-dark ancestor with no effectively-light ancestor in between.” That’s a recursive relational definition. CSS cannot express it. CSSLog can:"

The entire article doesn't seem to mention the existence of :has() which is rather surprising given how recently it was written. Not even in the footnotes.


Yeah, that example is bad. The query doesn't require recursion, but they affirm it does by demonstrating a recursively-defined version of it. This is called "affirming the consequent"; "P -> Q" doesn't mean "Q -> P". Ironic, given the use of propositional logic throughout.

doh, good point. will fix this, I acknowledge I sort of handwaved the example. thanks for the correction!

The simple solution is :enabled:hover. For example:

  .btn {
    &:enabled:hover {
      background: dodgerblue;
    }
    &:disabled {
      background: gray;
    }
  }

For every complex problem there is a solution that is clear, simple, and wrong.

HTTP mock servers

I’m working on mockaton, which is mainly a filename convention based router.

https://github.com/ericfortis/mockaton


I edited a proportional for coding, I’ve been using it for 10 years and it’s great except for tabular alignment.

So it would be nice if IDEs rich-rendered regions column aligned.

eg, object literals in JS, in which space separator are as a wide as needed to align the values.

JetBrains MPS has a decision table rendering for DSLs, which is similar to what I described.


> tabular alignment

Check out "elastic tabstops":

https://nick-gravgaard.com/elastic-tabstops/


Are you Nick?


No.


Thank you anyway, that gave me an idea for implementing it.

Here's the prototype https://x.com/efortis/status/2039539455128686677


If you prefer proportional fonts, here's one that pads a 1/3 of a space before uppercase letters, so it makes camelCase more legible.

https://github.com/ericfortis/verdanacamel


This is very cool.

Anecdotal solely to me, very unnerving and even with formatting marks enabled makes me feel uneasy seeing a space without a space formatting mark.


yep, sometimes I switch to mono before sharing my screen



  Location: Puerto Rico

  Remote: Yes

  Willing to relocate: Yes

  Technologies: React, Three, JS, TS, CSS, HTML

  Résumé/CV: https://ericfortis.com

  Email: efortis@gmail.com


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: