I'll use this to do a running commentary on a "style checkbox" in CSS. First trick is to put the label *after* the checkbox so you can use + to select it if the checkbox is :checked. Clicking the label activates the hidden input, so the label changes red/green.
Here's a demo of that first part working. Now to make the label look like a checked/unchecked box that's different.
The next trick is to use the :after to add content, *but* if you give an :after that has no content it still creates a block you can style. Here I'm just making a little square.
Then in the main label we set it to display:flex, align-items: center, and give it a bit of padding on the left and right. Now we have a little box that's sitting on the left. We then need it to move to the right when the checkbox is checked.
To do that we just add flex-direction: row-reverse so the contents of the label (aka the :after box) are drawn in reverse order. Put that in the :checked rule and now you have a little box that toggles sides when you click it.
Finally, you change the background to indicate checked/unchecked. This is sort of where I think it falls apart as a UI element. It's hard to make a difference between "unchecked" and "disabled", and I don't think it's that clear you can click on it to change it.
Here's a demo of what that looks like. I think next level is to allow for two blocks of text for checked/unchecked states.
Well that's not too hard. First make two children for the <active> and <inactive> displays. Then, a series of :checked and regular rules that show/hide those depending on the state. Finally, set justify-content to space-between to push them to either side and done.
Here's the demo for that. I wonder if I can throw some Icons in there?
And with a bunch of little minor changes we have this code for what I think is a full feature Switch:
People who write in a pompous "King James" style sound pretentious. This article on teaching completely loses the message because the author is trying to sound "official" by sounding "biblical". It then slides downhill from there as expected:
Clearly the author has never been poor, taught or studied in a poor school, never gone hungry, and has probably only taught people who would fit this model of "perfect". Slap all the "therefore" you want, the entire premise is disconnected from reality.
This is not supported by any research, and this is typically used to justify excluding people who don't already know a topic by claiming that a student is forever unteachable because they couldn't "handle" the artificial challenge. You mostly find this attitude in gifted kids who… twitter.com/i/web/status/1…
A thread of weird Youtube searches for when you want some soothing noise to code to. Most of these either have no talking, or if there is talking it's low whispers (because some folks like that). All of these are also Safe for Work in most places.
Here's my favorites:
1. "dugout"
It's almost always a Russian man or woman building a little house in the dirt. They don't talk much, usually there's a dog they talk to but otherwise, woods, rain, fires, cooking, and digging.
Similar to "dugout" but this is all over the world, with the best ones in Korea and Australia. A little more talking but not a lot of digging sounds and mostly just rain and cooking.
Another thought I had recently was that I would _like_ to actually buy a product from many open source projects. No, I don't want to donate, I want to pay you for a real product, so I'm your customer and you try to make me happy.
But they always screw this up in weird ways:
1. No, I don't want to buy you coffee, or "donate" because that's a dodge to avoid the obligation of treating me like a customer. FLOSS projects do this so they can get money, and then force any changes they want on your without your consent crying "ENTITLED" when you complain.
2. On average I pay say $10-$30 for a video game, and those are way more expensive to produce than most open source projects. That's a reasonable price point for a lot of things like gitea, but what do they do?
Target the ENTERPRISE market with "Call us for pricing!"
The comments are amazingly hypocritical given that...
Gitea is written in Go, which is famously run with an iron fist by Google.
The hypocrisy is simply amazing. If all of these people are so against corporate open source then why the hell are they also all using Go or anything by Google?
Because, if you're a Trillionaire then people are grateful for your table scraps and ignore their supposed "morals".
Google has:
1. Unilaterally pushed a packaging system they wanted without any community input. 2. Banned people randomly for criticizing the project. 3. Let a single engineer on Chrome decide the entire fate of gRPC on the internet.
Now I need to process the docs comment and either I support the JSDoc format--which irritates me--or simplify it.
My problem with the JSDoc format is it's just a copy of the JavaDoc format, and it's far too strict, which is a Java thing. I'd rather have it tone down the format's requirements and handle more looseness, which would make documentation easier.
But, the JSDoc/JavaDoc format does make a ton of sense in many ways. Since I'm actually parsing the file it _could_ eventually make guesses at return values, and at least show the value of default asigned parameters, but not much more without big code work.
I found it! It was in a Svelte transitions module that comes with Svelete, but...I think Microsoft is adding this copyright to all source that's compiled with TypeScript? I'm pretty damn sure that's not how copyright works, especially for programming languages.
There's no Copyright notice in that source .ts file, but this is what's in the generated .mjs file:
That confirms it then, Microsoft is plastering their Copyright on _your_ code when you use TypeScript. That's absolutely not correct, both morally and according to the law. Can you imagine if Adobe Premiere inserted a (c) Adobe on all movies you edited?