Explore My Notes

Dark mode in Gatsby | Josh W. Comeau

Josh outlines the various steps required to get a dark mode theme working properly in Gatsby. I've been wondering about adding a dark mode at some point and, honestly, I'm amazed by the number of steps required. Figured I should probably bookmark this for later as a result.

Seams and edges | Ethan Marcotte

Just after the 10-year anniversary of his Responsive Design article on A List Apart, Ethan has published some interesting thoughts on the nature of seams within responsive designs. Seams are the point at which a design fails. These can be viewport related – we've all resized a page in dev tools and suddenly realised that it's unusable at a specific aspect ratio – but, of course, also points out that seams can exist in non-visual elements of the page as well.

He ties that to design systems and their needs to consider individual patterns as mini responsive designs. Instead of fighting seams, he proposes looking back to Mark Boulton's concept of "content-out design".

Instead, [Mark] suggests that designing from the content out can create more interconnected, more harmonious layouts.

I love this concept. Even now, my first thought when beginning to design something in Photoshop, Illustrator, or wherever else, is to start by defining a canvas and (probably) a grid. Then I – as Ethan puts it – fill in that grid. However, the more I work with components, the more I find this a silly way of doing things. I end up stretching bits here and squeezing them there to get the component to span a certain number of columns or rows. Instead, what I've started doing is designing the component apart from everything else, to be the size and shape that feels right for whatever it (and it alone) contains. I hadn't considered doing that at a site-level, but I'd be excited to give it a try.

Racism in palaeoart and #BlackLivesMatter | Mark Witton

Palaeoart has actually been associated with suppression of non-white people both indirectly and rather pointedly, and not through obscure works or people, either. Famous historic figures, who are justifiably held in high regard for their scientific and palaeoartistic work, are part of this story.

There's some really interesting/disturbing stuff here. Cuvier worked on academic papers outlining biological divisions within races – i.e. racist pseudoscience – whilst De la Beche (the first palaeoartist in some senses) actively opposed the abolition of slavery, likely because he owned a plantation in Jamaica... Even Charles Knight's mentor, Cope, was outspoken on "white superiority" and believed Black Americans should be deported "back" to Africa.

Henry Fairfield Osborn was a proud eugenicist and Nazi supporter, who is well known to have abused his tenure as president of the American Museum of Natural History to promote a racist agenda. A prime example is his direction on the famous (infamous?) Neanderthal painting that Knight – whose own thoughts are not documented – produced for Osborn's "Hall of Man". It's an incredibly famous image still used frequently today, but ultimately the brutish nature of the people it portrayed were both based on racist themes and deliberately modelled on extant cultures that Osborn considered "primitive".

The symbolism here is as gross as it is obvious, and makes the Osborn/Knight Neanderthals the palaeoartistic equivalent of golliwogs, minstrels and mammy figurines.

Mark also outlines his intentions for acknowledging the racist associations with his field moving forward. These are noble and well-phrased, but I found this particularly pertinent:

I will not be derailing my talks into anti-racist events, but it's nothing to point out that 19th century science had links with slavery and attempted to scientifically prove the inferiority of black people. We shouldn't just let that slide.

Better image optimisation by restricting the colour index | Eric Meyer

When optimising images with only a few visible colours, reducing the output colour space can have massive savings (Eric is talking about the Acorn software here):

When I clicked the “Index PNG Colors” checkbox and changed the slider until I started getting dithers or obvious color loss, then brought it up a notch or two, the difference was astounding. Instead of a 30KB file, I got a 4.4 KB file. Instead of saving at 75% the original size, it was now 11%.

Hard to break | adactio

There's an idea at the core of Jeremy's thoughts here which struck a never, one that is best summed up in two quotes, one from Jeremy and another he quotes from Jamais Cascio (here given with Jamais first, Jeremy second):

When something is brittle, it’s susceptible to sudden and catastrophic failure.
It’s not that brittle sites don’t work. They work just fine …until they don’t.

I agree that brittleness is often a result of how things look fine. Jeremy makes the point that we have a "natural bias towards what's visible" and that's true. When the breaking points of our sites are invisible – because we're using fast connections, we're close to the server, we're operating on a desktop with a good screen, we're using a mouse to navigate – the site looks robust. But robust is not the same as "hard to break". It looks strong, but it may just be brittle.

Indieweb privacy challenges | Sebastian Greger

The IndieWeb was designed to be a better option for privacy, users, content authorship, and the open web. I think it largely meets those goals, but Sebastian has put together some excellent points on why it may fail on the privacy front at times:

  • Backfilling from silos can distort or misrepresent meaning. In other words, a "like" on Twitter may not be the same as a favourite or "like" on the IndieWeb. Nomenclature changes and people use these features for different purposes, for example for bookmarking posts;
  • Backfilling also adds unintended legitimacy to simple, spur-of-the-moment user interactions. Liking something on Twitter is considered fairly ephemeral by many: the author of the tweet will see I "liked" it, I will have a record, people can find that "like" if they dig deep enough etc. But backfilling onto a blog post means saving a person's digital identity – their profile photo, name, URL, details etc. – as well as their words to a more permanent store. Most importantly, you're doing so without asking their permission.
  • Relatedly, you're also not gaining permission to duplicate their content on your website. A reply that is backfilled is effectively stolen without authorial consent.

Sebastian has gone to lengths to solve these problems, anonymising his backfeed and generating pixelated avatars instead of displaying faces for any interactions that could be considered unintentional.

Example of anonymised feed with standard social sharing buttons and aggregated likes, favourites, and replies beneath. User photos have been pixelated and names removed.
I do think the idea of anonymising profile photos is pretty unique and looks great. I'd be interested to know if this method was random or if an image always output the same; the latter would be quite cool, but definitely has privacy concerns attached.

However, with the implementation of GDPR it seems that even that level of implementation may no longer fit privacy definitions. Whilst I would argue that many companies have since agreed that "public domain === consent" (that's certainly what I have been advised by multiple companies and legal firms), the right to delete is still a very valid point. As is the fact that – legal or not – you are copying someone's content and placing it somewhere else, without explicit consent. I have my own mixed and muddied views on that topic, but it is one that worries me.

Interestingly, it would seem that simply pulling total likes etc. from a silo would be fine and that makes sense. I see those interaction counts as ultimately the author's data, not each individual's who contributed, so only the silo would have a claim to stop you. Personally, that feels less creepy anyway, but it does lose the community feeling. Perhaps some kind of authorisation token within a person's own website (think IndieAuth) could be used to set your own privacy level to "always allow sharing", "never", or "only in X, Y, Z circumstances". As long as it was standardised it could work, though it would mean a separate fetch for each item in the backfeed (at a minimum, probably two: one to the silo profile, the second to the linked indie website).

Sass and clamp | adactio

Jeremy has been updating The Session to use variable font sizes with the new CSS clamp() property. He offers some interesting ideas on how best to do that:

:root {
    font-size: clamp(1rem, 0.5rem + 0.666vw, 1.5rem);
}

He also notes that in order to do this, he needed to remove Sass from the site. I find that interesting. Sass still appears to be a common prerequisite for frontend jobs, but I've never really understood why new projects would use it. When I returned to the frontend world a couple of years ago, I'd missed the Sass train. By the time I got around to thinking about learning it, I wanted to know what problem it solved. I came to the same conclusion then as Jeremy has done now, which is that all the solutions Sass provides are pretty much native to CSS these days.

Between CSS variables, customer properties, and calc() a lot of the benefit of Sass is now a burden. There are still two big bonuses: multiple files and nesting. I do wish CSS had a native nesting capability, but for the most part when I review Sass code it gives me a headache. DRY is great, but not at the expense of readability, which I fear it often ends up becoming with deep nesting.

As for multiple files, I guess I moved straight into the framework world on return. It's one of the things I love about CSS modules in React, that it lets me colocate my styles with my components from a dev perspective. In many ways, I prefer this to the .scss model.

I still have to work with Sass and imagine that isn't going to change; it's integral to a lot of tech stacks. But it's nice to see that I've potentially skipped needing to embrace it fully.

It feels like something similar has happened with tools like Sass. Sass was the hare. CSS is the tortoise. Sass blazed the trail, but now native CSS can achieve much the same result.

Figure it out | A List Apart

Colour is tricky, as discussed in this chapter of Figure it Out: Getting from Information to Understanding.

  • Western cultures have seven colours in the rainbow (ROYGBIV) because that's what Isaac Newton decided, based (of all things) on the Western musical scale. Seven notes, seven colours. That could explain why I (and many others) have no idea which part is "indigo".
  • Languages may have thousands of words or phrases for specific colours, but in general cultures tend to settle on < 20 for common use (normally around 10). That means different cultures perceive – linguistically at least – different colours with different words.
  • Russia, for example, has specific words for light blue and dark blue; they are two distinct colours. Early-modern Japanese (prior to extensive Western influence) grouped greens and blues together as one colour. The Berinmo people of Papua New Guinea see "yellow" as two distinct colours, nol and wor.
  • However, it does seem that colours follow a pattern of recognition within languages. First come words for dark and light (sometimes evolving in black and white over time); then red, followed (often quite a bit later) by either yellow or green. The last colour seems to always be blue. Again, there are exceptions, but in general this trend is observable around the world in linguistic archaeology.
While we’re keen to seek out human universals, color has proven to be something that does not have consistent meaning across cultures, or even within a culture group... The meanings we point to—blue as a safe, corporate color, for example—are highly generalized assumptions, highly contextual, and mostly learned associations.

The article continues by reviewing some of the impacts colour choices can have, though interestingly one of them didn't work for me. This graph is used to show that saturation can cause information bias; the chart on the left uses colours of uneven saturation levels, the one on the right has been "balanced" for saturation:

Two pie charts with identical segments, but one has been balanced for saturation by using different colours.
I wonder how many other people find the results of this experiment topsy-turvy...

The article claims that this causes the one on the left to become misleading, drawing your attention specifically to the orange segment and making it "pop". Weirdly, the opposite is the case for me. The left chart is very evenly balanced to my eyes and lets me take in the whole pattern very easily. The chart on the right I find very distracting, immediately being drawn to the red and purple and actively perceiving those segments as larger than they clearly are on the left-hand chart. The article argues that you should avoid the left chart as it is "unevenly perceived". Unfortunately, it seems like the right chart hits those same issues for me, so perhaps the lesson is that you're damned if you do, damned if you don't?

On a lighter note, they also reference this excellent breakdown of colour language in English by XKCD:

Colour map with English names drawn over the regions most likely to use that term, showing very uneven distribution and highly wavy boundaries.
I'd love to know who actually refers to a colour as "dark teal"? And where is "violet"?

Leaky roofs | Seth Godin

Expectations can be all the difference. Getting wet whilst outside? Understandable. Getting wet whilst inside, though?

Promising us a roof and then breaking that promise might be worse than no roof at all.

The miracle sudoku | Cracking the Cryptic

Attempting to solve a sudoku with only two clues and some abnormal rules turns into a joyous, strangely tense thrill ride.

Marxian alienation and web development | Heydon Works

Some interesting thoughts from Heydon on burnout, why it's a positive thing that we're talking about it more, and what a major root cause is for many people:

Burnout is what Marx called alienation. It's when a worker becomes estranged from their work. It sounds like a big, grand thing, but it happens every day, in small ways. As a web designer or developer burnout comes calling when you try to do good work, but you're not allowed.

Made By Me, But Made Possible By:

CMS:

Build: Gatsby

Deployment: GitHub

Hosting: Netlify

Connect With Me:

Twitter Twitter

Instagram Instragram

500px 500px

GitHub GitHub

Keep Up To Date:

All Posts RSS feed.

Articles RSS feed.

Journal RSS feed.

Notes RSS feed.