dysbulic π
KPCKevin Powell - Community
β’Created by dysbulic π on 4/4/2024 in #front-end
How to color text so it is visible against any background color?
35 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 2/12/2024 in #back-end
Cookie Confusion
I'm using
iron-session
to store the information necessary for ConnectKit's Sign-In With Ethereum (SIWE) to work on a GitHub pages hosted site backed by Supabase edge functions. (ConnectKit expects to have access to a /session
endpoint that returns the authenticated user's Ethereum address.)
iron-session
stores session information as an encrypted string sent back and forth as a cookie. The problem I'm having is if SameSite
is set to Lax
or Strict
, I get an error:
This is because the Supabase edge functions run on aThis attempt to set a cookie via a set-cookie header was blocked because it had a
SameSite="Lax"attribute but came from a cross-site response which was not a response to a top-level navigation.
randomuid.supabase.co
host. If I set SameSite
to None
, I can get the cookie to go through, but I know browsers are increasingly restricting third-party cookies.
Anyone have a suggestion as to how I should restructure my code? The obvious solution would be to use Supabase's session, but because I'm using SIWE, I don't think I have access to it. The Google page on deprecation of third-party cookies lists a few technological alternatives, probably using partitioned cookies is the way to go.1 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 1/18/2024 in #back-end
My Svelte app compiles, but dies on loading. βΈWhyβ½
I'm working on my first Svelte app, & it dies in the browser with:
I've defined a
<article id="globe">
in the Svelte app where this script is running.5 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 9/10/2023 in #front-end
How to get an element to fit within its parent?
I'm working on a simple layout: https://codepen.io/u3b4/pen/gOZmKmw
The basic structure is something like:
What I want to do is put a
max-width: 100svw
& max-height: 100svh
on the main
element, and then have the children resize to fit within a single screen.
I'm using a columnar flexbox on main
and a regular flexbox on .top
.
Currently the video
is way too big. I've tried object-fit: contain
, but that was no good.
Can someone point me in the right direction?5 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 7/25/2023 in #os-and-tools
Is this a bug in Chrome *(`@supports (animation)` for a SVG favicon)*?
I have the following SVG as my favicon on https://bafybeihfwqwlluejiuskhmgdcq7sme54m4ewtzfluodr2duj3yokjzyehe.ipfs.dweb.link/
In Firefox, I get an animated favicon. In Chrome, I get just the first letter, on a green background, no animation. In Brave, I just get a green square, no letters.
I'm using
@supports (not(animation: scroll))
to try and identify environments that don't support @keyframes
, but it doesn't match any of the browsers. Shouldn't it?2 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 7/19/2023 in #front-end
TypeScript `|` Combinator
I have the following code:
And, TypeScript is giving me the following error:
I thought that
let pet: Cat | Dog
means I can assign either a Cat
or Dog
to it. Is that not right?2 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 7/18/2023 in #front-end
Why is the height of my body 0px?
I'm playing around with a personality type scoring interface. For some reason, the
<body>
and #root
(it's a Next.js app) have a calculated height of 0px.
https://bafybeigigh6p2fcpfqmck32vkpi3i3akknmh5sbabtvupbiknfzqrkw4ha.ipfs.w3s.link/
Anyone have any suggestions?5 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 6/13/2023 in #front-end
Horizontal Accordion of Links
10 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 4/4/2023 in #os-and-tools
Virtual PulseAudio device that will run all my speakers simultaneously doesn't work. π¦
1 replies
KPCKevin Powell - Community
β’Created by dysbulic π on 3/1/2023 in #front-end
How to theme when using CSS modules?
So, I'm currently working on a pitch to dig deep into the guts of https://metagame.wtf and tear out all the Chakra UI.
Replace it instead with semantic HTML & class and id-based matched CSS modules as parsed by whatever.
The visual appearance of the page is contained solely in external CSS files, the structural appearance in the markup.
So, a pair of programmers picks some set of issues to forward. They begin their session with a 30-minute overlap with the previous pair where they hand-off development tasks. And it just hands team to team in a single line through history.
The problem is I would like to store styles as metadata in NFTs. Just JS-in-CSS style JSON-formatted styles. I want to insert the contents of that file into the CSS cascade giving it as much descriptive power as possible. So you can redraw your site to your liking.
How would that work with CSS modules? You're not generating semantic tag classes & ids, you're creating something to get munged to get the program to work like we want. It is a hack.
However, when combined with nested selectors and semantic matching, it is a really powerful way to target styles only to specific portions of the page.
What I really need, I guess is that when I create a classes entry for a CSS module I need both the generated classname to pull in the files I've defined, but also the unaltered semantic name so that the user stylesheet can match on it (which is, again, stored in the NFT's metadata).
2 replies