Skip to content

Instantly share code, notes, and snippets.

@glebsexy
glebsexy / README.md
Created October 24, 2021 08:55
Figma Svelte plugin Rollup + Typescript config

Using two directories in src folder: ui and code with two separate tsconfig files. ui folder contains an empty.ts file with export {} to satisfy the compiler.

This is a heavily modified Rollup config from https://github.com/thomas-lowry/figsvelte

@glebsexy
glebsexy / about.md
Last active March 25, 2020 00:23 — forked from mattdesl/about.md
Figma Plugin Utility: html <-> script I/O for TypeScript

Figma Plugin Utility: html<->script I/O

Inspired by Electron, a simple event emitter you can use to communicate between your main script and your html UI. Original by @mattdesl, adapted to TypeScript by me.

Webpack guide for Figma plugins: https://www.figma.com/plugin-docs/bundling-webpack/

Install types for events:

npm install @types/events
@glebsexy
glebsexy / check-pencil-morph.shapeshifter
Created October 13, 2019 05:38
ShapeShifter.design file animating between pencil and checkmark
{
"version": 1,
"layers": {
"vectorLayer": {
"id": "27225",
"name": "vector",
"type": "vector",
"width": 16,
"height": 16,
"children": [
@glebsexy
glebsexy / about.md
Last active April 22, 2022 17:09
Change all default fonts to Inter

What?

This style allows you to set all default fonts on the web to Inter typeface made by Rasmus Andersson. It's a great font and fits very nicely within any website which uses default typefaces.

How to enable?

I use a Chrome extension called User JavaScript and CSS to inject this custom CSS into every page. Use * in place of website URL to inject the script into every webpage.

However, I would suggest excluding all websites you use frequently which use custom fonts so you don't run into trouble. For me it was Google Docs — they become buggy if this font is enabled. For example, write *, !docs.google.com, !excludedwebsite.com to activate the style on all pages except Google Docs and “excludedwebsite.com” (write a comma-separated list of domains you want to exclude starting each one with an exclamation mark).

I recommend installing the font locally so you won't use more ne

@glebsexy
glebsexy / Figma Dark.sublime-color-scheme
Last active September 12, 2019 21:42
Dark Figma color scheme for Sublime Text 3
{
"name": "Figma",
"author": "Gleb Sabirzyanov",
"variables":
{
"black": "#000000",
"blue": "#1ABCFE",
"blue2": "#A259FF",
"blue3": "#A259FF",
"blue4": "#A259FF",
@glebsexy
glebsexy / SketchSystems.spec
Last active July 27, 2019 03:17
Blend Selection
Blend Selection
node selected -> Node Selected
pair selected -> Pair Selected
many selected -> Many Selected
Nothing selected
Node Selected
Blend Group
done -> Selection Found
@glebsexy
glebsexy / SketchSystems.spec
Last active July 27, 2019 03:16
Plugin Opened
Plugin Opened
2 objects selected -> Blend Created
1 object selected -> Select Objects
0 or many objects selected -> Select Objects
Select Objects
Blend Created&
Blend Plugin
Green*
tick -> Yellow
Yellow
tick -> Red
Red
tick -> Green