Skip to content

Instantly share code, notes, and snippets.

View fvsch's full-sized avatar

Florens Verschelde fvsch

View GitHub Profile
@fvsch
fvsch / stackblitz-sdk-console-test.js
Created March 30, 2023 09:23
Testing the StackBlitz SDK from a browser's console
void (async function () {
// set origin to the StackBlitz instance you want to test
const origin = 'https://stackblitz.com';
const sdk = await import(
'https://unpkg.com/@stackblitz/sdk@1/bundles/sdk.m.js'
).then((module) => module.default);
const jsProject = {
title: 'JS Project',
@fvsch
fvsch / theme-contrast.svg
Created February 12, 2021 08:42
Proposed forced-color icons for Firefox DevTools
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fvsch
fvsch / machine.js
Created January 5, 2021 17:54
Generated by XState Viz: https://xstate.js.org/viz
const gameMachine = Machine({
id: "game",
initial: "setup",
states: {
setup: {
on: {
START_PLAYING: "playing",
},
},
playing: {
/* DIV in the Shadow DOM in Safari, has white-space:pre so text doesn't wrap */
::-webkit-media-text-track-display {
white-space: normal !important;
}
/* These overrides should work but don't seem to be working at all, not sure why */
::-webkit-media-text-track-display-backdrop {
background-color: black !important; /* default: rgba(0, 0, 0, 0.5) */
}
/* SPAN inside the track-display container, has a forced color, better to not mess with it? */
::cue {
@fvsch
fvsch / icon.css
Created June 20, 2018 12:35
Twig macro and default style for SVG icons
/**
* Default style for SVG icons
*/
.icon {
/* Allows sizing by changing the icon’s font-size.
(It should override the element's width/height attributes, if they exist.) */
width: 1em;
height: 1em;
/* This prevents having extra space below icons, and can be overriden easily
to vertical-align:middle or vertical-align:-0.3em if needed. */