909 karma · joined May 26, 2013
So I made this example: https://jsbin.com/meqibawotu/1/edit?html,css,output
We have two "toggle vars", `--is-hovered` and `--is-special`, which are triggered by a hover selector and a class, respectively, though they could be triggered by anything (like a media query or JS).
The "false" value for the toggle is "initial", so at the top I set:
div {
--is-hovered: initial;
--is-special: initial;
}
The first trick is that assigning a variable value as a single space token is valid according to spec (https://www.w3.org/TR/css-variables-1/#syntax), making the var(...) usage substitute a single space. So if our variable should be "true", we use whatever method to set it to a single space: div:hover {
--is-hovered: ;
}
div.special {
--is-special: ;
}
The second trick is that an invalid property value will fall back to the second argument of the `var()` function. So we first create a property that only has a valid value if the flag is true (a single space): --hover-opacity: var(--is-hovered) 1.0;
If the div is hovered, `--is-hovered` is a single space, so the property value becomes: --hover-opacity: 1.0; // note two spaces
If the div isn't hovered, `--is-hovered` is `initial`, so the property value becomes: --hover-opacity: initial 1.0;
Which is invalid CSS!We can then interpret this in our final opacity property:
--regular-opacity: 0.5;
--opacity: var(--hover-opacity, var(--regular-opacity));
If the div is hovered, the first argument is evaluated to: --opacity: var( 1.0, var(--regular-opacity));
And since that's valid syntax, the second argument is short-circuited (ignored). However, if the div isn't hovered, then the opacity property is computed as: --opacity: var(initial 1.0, var(--regular-opacity));
The first argument is invalid! So the property falls back to the second argument, and we get `var(--regular-opacity)`.Every app I could find had some dark pattern or an overflow of ads or both. Some kind of streak system where you were encouraged / nagged to play every day or else lose your "coins" (aka preying on loss aversion to try and addict players), fullscreen interstitial ad pages that try to trick you into clicking them when you're moving cards? Animated banners that distract you from the game?
I ended up giving up and just using a web version. It's not perfect, it's made for desktop and the cards are really small on my iphone 6 and the UI is hard to use, but it's clearly someone's labor of love and a lot pf care has been put into it. I'd happily pay a few dollars for it, if it wasn't free.
There's not many apps like that on the App Store nowadays. And with Apple's predatory rent-seeking practices, requirements of owning a $2000 computer to develop for their platform, and high developer fees, they aren't helping the situation.
They also did another version of the study where the thing being bought was a backup camera for a used car, and the study was 2x2: along with the income framing, there was also a framing of convenience vs safety (backup cameras are now required on all new cars since 2018 because they significantly increase safety, especially for pedestrians). Participants still rated the permissibility of a safety feature higher for a rich person than for a poor person, and rated the "convenient" camera for a rich person just as permissible as a safety camera for a poor person.
https://sci-hub.tw/downloads-ii/2020-06-09/9a/10.1073@pnas.2...
Fiction -> convert with Calibre and email to my Kindle
The downvoted commenter was being a jerk, but I do think learning ASL is an option worth looking into.
1, it increases the risk for creators. While an equipment grant is extremely useful, the biggest investment (having made a couple educational videos myself) is time. Having to then limit yourself to a platform with very low user adoption is a huge risk, and harmful to creator morale if the videos struggle for an audience due to the platform.
2, and this ties into the first problem, it's not good for marketing. If you look at how another Youtube competitor, Nebula, is handling this, they have creators cross-post most of their content to Youtube. Creators then advertise Nebula in their sponsorship timeslot, extolling its virtues for creator sustainability etc -- which PeerTube would greatly benefit from as many people aren't aware of the benefit of a distributed system, or what that even means. Additionally, they upload some sort of exclusive -- either longer videos with content that wouldn't fit on YT (LegalEagle is a good example of a channel that does this), or special long-form projects (Wendover Productions uses this model). Either way, this lets Nebula hijack Youtube's recommendation algorithm and built in audience as essentially free advertising, as the content being uploaded to YT is being posted to Nebula anyways. Obviously many people just watch on YT and ignore Nebula as it requires a subscription, but PeerTube doesn't and Nebula is succeeding despite that -- anecdotally, me and my fiance bought a subscription because of this strategy.
With that out of the way, I do love this idea and hope it gets traction regardless!
There are exceptions to this, for example a visual novel or a turn-based strategy game, but those are often satisfied to just eat the performance penalty for the ability to use standard tooling, or can use engines or standard UI toolkits like React that can do a temporal diff. For example, I've written several text-based games [1] that just use the DOM because using canvas or WebGL wasn't necessary. I've written other games that use a hybrid approach of absolutely-positioning temporally diffed DOM over a frame-by-frame redrawn canvas, to get the best of both worlds [2]. And I've also written games in e.g. Unity where it's easier and performant enough to use ImGui and redraw it every frame. Ultimately it cones down to what's practical and what's performant enough.
[1] https://vgel.itch.io/themengi , https://vgel.itch.io/the-sacred-text [2] https://vgel.me/hoverator