Skip to content

Instantly share code, notes, and snippets.

View tiloyi's full-sized avatar

Trésor ILOYI tiloyi

View GitHub Profile
@tiloyi
tiloyi / dynamic-slots-in-svelte.md
Created April 11, 2026 19:14
Dynamic Slots in Svelte: Working Around the Compile-Time Restriction with Actions

Dynamic Slots in Svelte: Working Around the Compile-Time Restriction with Actions

Svelte requires slot names to be static strings. Here's how to go beyond this limitation cleanly, without hacks, by leveraging Svelte's own execution model.


The Problem

If you develop Svelte components, you've probably needed dynamically named slots at some point — that is, slots whose name depends on runtime data.

@tiloyi
tiloyi / scss-at-function-pattern.md
Last active June 13, 2025 12:46
[Stylelint] – scss/at-function-pattern (Sass / SCSS private members)

About Sass Private Members

The Sass specification allows us to create private functions. These private functions are usable and available only within a Sass module and cannot therefore be consumed outside this module.

To make a function private, simply prefix the function with the - or _ character.

For more information, see Sass documentation here: https://sass-lang.com/documentation/at-rules/use/#private-members

Issue with Stylelint & stylelint-config-standard-scss

@tiloyi
tiloyi / scss-at-mixin-pattern.md
Last active June 13, 2025 12:46
[Stylelint] – scss/at-mixin-pattern (Sass / SCSS private members)

About Sass Private Members

The Sass specification allows us to create private mixins. These private mixins are usable and available only within a Sass module and cannot therefore be consumed outside this module.

To make a mixin private, simply prefix the mixin with the - or _ character.

For more information, see Sass documentation here: https://sass-lang.com/documentation/at-rules/use/#private-members

Issue with Stylelint & stylelint-config-standard-scss

@tiloyi
tiloyi / Basiques.html
Created September 30, 2023 15:18
[Standard Notes] Example of a crashing HTML file
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Basiques</title>
<style type="text/css">
body {
font-family: 'Roboto Condensed','Droid Sans',arial,sans-serif;
font-size: 15px;
@tiloyi
tiloyi / rename-local-master-branch.md
Last active July 8, 2023 08:09
[Git] – renaming the master branch #memo