Unlike DatoCMS and Contentstack , you cannot restrict a Contentful content model to be used to create a single record, only multiple (as per design). As a workaround you can add a text field (with a dropdown appearance for example) to the model which only accepts a single exact value, marked as required and unique. It won't prevent creating additional records, but it will prevent publishing more…
TIL about scrollbar-gutter , a useful CSS property that forces a scrollbar gutter in lieu of the scrollbar itself when it normally wouldn't render (i.e. <body> will not fully extend to the edges of the page so it should only be used on sites that do not rely on viewport-width elements.
As part of YouTube's TOS , the embedded player (i.e. iframe ) must provide identification via the HTTP Referer header ( not a typo unfortunately ), otherwise you may end up with the following error: To remedy this, make sure it's at least set to strict-origin-when-cross-origin . Adding referrerpolicy="strict-origin-when-cross-origin" to the iframe alone may not be sufficient.
TIL about the genius of using an input="range" as a (programmable) scrollbar replacement when using the native one isn't possible. I ran across this when trying to set up a more performant and reliable custom scrollbar for Embla Carousel , but I'm sure it can be used elsewhere, too.
In the following example, <price display="no">$500,000.99</price> <priceView>Between $400,000 and $600,000</priceView> the priceView text is not displayed in lieu of the price because display="no" actually hides everything price-related, toggling "Contact Agent" instead. Personally I don't think this is made clear enough in the documentation .
Asset fields values are read as a regular object (i.e. with access to a filename , uid , etc.), and updated as a string that corresponds to an existing asset UID (using the CMA SDK at least).
Query filters don't work how you'd expect them when combined with the fallbackLocales flag (i.e. filtering isn't conducted on "merged" data - because it isn't even available at that point). This can lead to false-positives in terms of the data returned and can really only be handled properly filtering post-fetch (i.e. in your code).