348 private links
An other ready-to-production framework with an opinionated tech stack. Powered by Vercel.
An interactive gallery that demonstrated what's possible with just CSS gradients.
CSS variables that provoke invalid CSS declarations (for example --foo: ;) are set to unset.
Space toggle for numerical value: calc(1.5 var(--toggle-value, - .4))
with toggle value:
:root {
--ON: initial
--OFF: ;
}
Use variables for pure data, not CSS values as CSS values are often bound with a unit.
Relative values inherit as syntax tokens unless the property is registered. Registering a property as
Again CSS properties:
.box {
padding: var(--py, 1rem) var(--px, 1rem);
}
.box--some-variant {
--px: 2rem;
}👍
- Think about the
:emptyselector, especially for message errors :) :targetto select the node targeted by an achor.:only-childand:only-of-typeselectors
The article element represents a complete, or self-contained, composition in a document, page, application, or site; that is, in principle, independently distributable or reusable, e.g., in syndication.
I gave my usual answer: think of
not just as a newspaper article or a blog post, but as an article of clothing — a discrete entity that can be reused in another context. [...] It means an article represents content that can be taken out of the document and away from the immediate surrounding content, dropped somewhere else, say on another page, and still make total sense as it is grouped. The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading.
A general rule is that the section element is appropriate only if the element’s contents are listed explicitly in the document’s outline. [...] a section is a part of a larger group without which it may not necessarily stand to make complete sense alone
To provide more meaning to a section for assistive technology: the attribute aria-labelledby="an-id" or aria-label=" a meaning" can be used. A labelledby attribute can be bound to a title for example.
This example of meaningful semantic shows the usefulness: https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/ceca208c-154e-42f4-b769-b62c67f0c125/content-design-screenshot.png
A search engine for programmers
Another problem is social markup not being identified properly, for example by LinkedIn, if it’s not following a
start tag.
Wtf
Minimal markup:
<!-- <head> (and <body>) needed for LinkedIn -->
<head>
<!-- “twitter:card” and title needed for Twitter -->
<meta name=twitter:card content=summary_large_image>
<meta property=og:title content="This is a test title">
<!-- Quotes needed for WhatsApp and Signal -->
<meta property="og:description" name="description" content="This is a test description.">
<meta property="og:image" content="https://hell.meiert.org/core/png/test.png">A pure CSS form plugin
TL;DR Nearly 50% of HWB possible values tends to grey shades.
In both HWB & HSL colors, we can describe white and black and a full scale of grays using any hue we want. It doesn’t matter what hue we provide in either table
Lucky for us, browsers don’t generally render gradients using naive HSL math: currently browsers convert everything to sRGB before mixing. Gradients in RGB can still get muddy at times
<div>
<div>
Name: Joe Blow
</div>
<div>
Email: joe@blow.com
</div>
<div>
<a href="/contacts/42/edit">Edit</a>
<a href="/contacts/42/email">Email</a>
<a href="/contacts/42/archive">Archive</a>
</div>
</div>
→
So, what makes this HTML/hypertext special? The answer is also simple: this bit of HTML encodes both the data about the contact as well as the actions available on that data, in the form of hyperlinks.
A et B sont deux tranches horaires avec les indices: 1 le début de la tranche horaire et 2 la fin de la tranche horaire.
Alors il suffit de résoudre l'expression suivante:
(B2 < A1 or B1 > A2)
Et voilà !
Formalizing REST APIs
My API is up to level 2 on the Richardson Maturity Model. So my API is more an HTTP+JSON RPC than Rest.
The short answer to this question is that HATEOAS isn’t a good fit for most modern use cases for APIs. That is why after almost 20 years, HATEOAS still hasn’t gained wide adoption among developers. GraphQL on the other hand is spreading like wildfire because it solves real-world problems. ‒ GraphQL and REST Level 3 (HATEOAS)
I feel this feeling too that something is wrong
Without auto, the
remains 4 / 3, and the image appears stretched. You can avoid the stretching with object-fit:
img {
aspect-ratio: 4 / 3;
width: 100%;
object-fit: cover;
}
Although, if the image isn't actually that aspect ratio, it'll either end up stretched (object-fit: fill), letter-boxed (object-fit: contain), or cropped (object-fit: cover). None of which are ideal.