Skip to content

Instantly share code, notes, and snippets.

View trys's full-sized avatar
🤓
🚀

Trys Mudford trys

🤓
🚀
View GitHub Profile
@trys
trys / globalTokens.stylex.ts
Created January 17, 2024 21:44
StyleX X Utopia
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
import stylex from '@stylexjs/stylex';
@trys
trys / README.md
Created January 10, 2020 23:29
Twitter logout on scroll

Twitter logout on scroll

Source

Idea by Benjamin Parry.

I’m in the market for a browser extension that launches the log out modal after 3 scrolls of my Twitter feed.

Paging @trysmudford

@trys
trys / card.html
Last active April 14, 2019 19:35
Named slots - 1
<article>
<h2><sergey-slot name="title" /></h2>
<hr />
<p>Written by <sergey-slot name="author" /></p>
</article>
@trys
trys / index.html
Last active April 14, 2019 19:36
Named slots - 2
<sergey-import src="card">
<sergey-template name="title">Blog post #1</sergey-template>
<sergey-template name="author">
<a href="/trys">Trys</a>
</sergey-template>
</sergey-import>
@trys
trys / index.html
Created April 10, 2019 19:53
Sergey - Template 2
<sergey-import src="template">
<p>Our page-specific content gets surrounded by the template automatically!</p>
</sergey-import>
@trys
trys / template.html
Created April 10, 2019 19:48
Sergey template
<!DOCTYPE html>
<html>
<head>
<sergey-import src="head">
<title>Title</title>
</sergey-import>
</head>
<body>
@trys
trys / head.html
Created April 10, 2019 19:40
Sergey - Slots 4
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/assets/css/style.css" />
<sergey-slot>
<title>My default title</title>
</sergey-slot>
@trys
trys / index.html
Created April 10, 2019 19:35
Sergey - Slots 3
<!DOCTYPE html>
<html>
<head>
<sergey-import src="head">
<title>Our custom page title</title>
</sergey-import>
</head>
@trys
trys / head.html
Created April 10, 2019 19:28
Sergey - Slots 2
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/assets/css/style.css" />
<sergey-slot />
@trys
trys / head.html
Created April 10, 2019 19:26
Sergey - Slots example
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/assets/css/style.css" />
<title>Our website title</title>