Lofty!
Lofty!
Explore posts from servers
KPCKevin Powell - Community
Created by Lofty! on 1/29/2025 in #os-and-tools
Extension to display colours for oklch and oklab functions?
Sorry! I did come across one - https://marketplace.visualstudio.com/items?itemName=JeronimoEkerdt.color-picker-universal It does have a problem of adding those previews to colours in any file you open, but it works somehow. I do intend to make a seperate extension soon, if I can!!
3 replies
KPCKevin Powell - Community
Created by Lofty! on 2/9/2025 in #front-end
Need help making the Navbar responsive
not sure why it wasn't in what I shared..
8 replies
KPCKevin Powell - Community
Created by Lofty! on 2/9/2025 in #front-end
Need help making the Navbar responsive
well crap. Uh, There needs to be a .env file with OGP_SITENAME = "something"
8 replies
KPCKevin Powell - Community
Created by Lofty! on 2/9/2025 in #front-end
Need help making the Navbar responsive
Thanks beck!
8 replies
KPCKevin Powell - Community
Created by Lofty! on 2/9/2025 in #front-end
Need help making the Navbar responsive
well I copied that from a calculator.. I'll go back and fix that.
8 replies
KPCKevin Powell - Community
Created by Lofty! on 2/2/2025 in #front-end
How to make a button seem more like a button?
Well hopefully its a bit more obvious now? I do want it to look fancy as well
18 replies
KPCKevin Powell - Community
Created by Lofty! on 2/2/2025 in #front-end
How to make a button seem more like a button?
Wait, is Cloudflare automatically building on push? I did not manually deploy that change
18 replies
KPCKevin Powell - Community
Created by Lofty! on 2/2/2025 in #front-end
How to make a button seem more like a button?
yes it is- it's a slightly offset ::after
18 replies
KPCKevin Powell - Community
Created by Lofty! on 2/2/2025 in #front-end
How to make a button seem more like a button?
not really, apart from that I spent a long time tweaking it to write that word haha.
18 replies
KPCKevin Powell - Community
Created by Lofty! on 2/2/2025 in #front-end
How to make a button seem more like a button?
Had me confused for a second there.. yes, I do have those already. Just that visually, its not obvious that the "close" word is a "button", immediately
18 replies
KPCKevin Powell - Community
Created by Lofty! on 2/2/2025 in #front-end
How to make a button seem more like a button?
I was looking for something a tad bit less... intrusive? But yes, that works. I get your point
18 replies
KPCKevin Powell - Community
Created by b1mind on 10/9/2024 in #resources
Google Font Alternative
check if you can subset fonts as per the license... might be a good thing to so as well 👀
16 replies
KPCKevin Powell - Community
Created by Zach on 8/29/2024 in #resources
Email is dead
"We only need one politician's emails not delivered due to poorly implemented or arbitrary hellbans and this will be a hot button issue." sure do hope someone sees this.
8 replies
KPCKevin Powell - Community
Created by Lofty! on 10/1/2024 in #front-end
How do you makes "emoji as a letter" accessible?
thanks <3
25 replies
KPCKevin Powell - Community
Created by Lofty! on 10/1/2024 in #front-end
How do you makes "emoji as a letter" accessible?
oh wow, I come back after a while and.. damn.
25 replies
KPCKevin Powell - Community
Created by Lofty! on 10/1/2024 in #front-end
How do you makes "emoji as a letter" accessible?
all good, got the idea!
25 replies
KPCKevin Powell - Community
Created by Lofty! on 10/1/2024 in #front-end
How do you makes "emoji as a letter" accessible?
Sounds kinda... silly but how would I hide it but ensure that the text remains centered(-ish)? Here's the current component that I have:
<section>
<p><span>I</span>deas go on pages,<br />not in bins.</p>
</section>

<style>
section {
max-width: var(--prose-width);
margin: 0 auto;
padding: 2rem 0.75rem 0 0.75rem;
}

p {
--font-hero-logo: clamp(1.56rem, 1.122rem + 2.19vw, 3.75rem);
font: var(--font-hero-logo) aclonica;
text-align: center;
}

span {
/* dunno what to put here */

&::before {
content: "💡";
}
}
</style>
<section>
<p><span>I</span>deas go on pages,<br />not in bins.</p>
</section>

<style>
section {
max-width: var(--prose-width);
margin: 0 auto;
padding: 2rem 0.75rem 0 0.75rem;
}

p {
--font-hero-logo: clamp(1.56rem, 1.122rem + 2.19vw, 3.75rem);
font: var(--font-hero-logo) aclonica;
text-align: center;
}

span {
/* dunno what to put here */

&::before {
content: "💡";
}
}
</style>
25 replies
KPCKevin Powell - Community
Created by Lofty! on 9/14/2024 in #front-end
How do I use matchMedia in svelte?
interface Params {
query: string;
initial: (matches: boolean) => void;
listener: (list: MediaQueryListEvent) => void;
}

export class MediaQuery {
#queryList: MediaQueryList | undefined;
#params: Params;

constructor(params: Params) {
this.#params = params;
}

mountMediaQuery = () => {
this.#queryList = window.matchMedia(this.#params.query);
this.#params.initial(this.#queryList.matches);

const instance = this.#params.listener.bind(this);
this.#queryList.addEventListener("change", instance);
return () => this.#queryList?.removeEventListener("change", instance);
}
}
interface Params {
query: string;
initial: (matches: boolean) => void;
listener: (list: MediaQueryListEvent) => void;
}

export class MediaQuery {
#queryList: MediaQueryList | undefined;
#params: Params;

constructor(params: Params) {
this.#params = params;
}

mountMediaQuery = () => {
this.#queryList = window.matchMedia(this.#params.query);
this.#params.initial(this.#queryList.matches);

const instance = this.#params.listener.bind(this);
this.#queryList.addEventListener("change", instance);
return () => this.#queryList?.removeEventListener("change", instance);
}
}
let ticking: number | boolean = false;
const onScrollListener = () => {
ticking ||= requestAnimationFrame(() => {
burger = window.scrollY === 0;
ticking = false;
});
};

const mediaQuery = new MediaQuery({
query: "(width >= 768px)",
initial(matches: boolean) {
if (matches) document.addEventListener("scroll", onScrollListener);
burger = matches;
},
listener(list: MediaQueryListEvent) {
burger = list.matches;
if (list.matches) document.addEventListener("scroll", onScrollListener);
else document.removeEventListener("scroll", onScrollListener);
},
});

onMount(mediaQuery.mountMediaQuery);
let ticking: number | boolean = false;
const onScrollListener = () => {
ticking ||= requestAnimationFrame(() => {
burger = window.scrollY === 0;
ticking = false;
});
};

const mediaQuery = new MediaQuery({
query: "(width >= 768px)",
initial(matches: boolean) {
if (matches) document.addEventListener("scroll", onScrollListener);
burger = matches;
},
listener(list: MediaQueryListEvent) {
burger = list.matches;
if (list.matches) document.addEventListener("scroll", onScrollListener);
else document.removeEventListener("scroll", onScrollListener);
},
});

onMount(mediaQuery.mountMediaQuery);
8 replies
KPCKevin Powell - Community
Created by Lofty! on 9/14/2024 in #front-end
How do I use matchMedia in svelte?
Oh, I didn't see this last night 😅 I wrote a tiny utility for this and it worked
8 replies
KPCKevin Powell - Community
Created by Lofty! on 9/14/2024 in #front-end
How do I use matchMedia in svelte?
svelte-match-media has a way to attach event listeners to it? Its docs dont give any examples
8 replies