Skip to content

Instantly share code, notes, and snippets.

View chriskirknielsen's full-sized avatar

Christopher Kirk-Nielsen chriskirknielsen

View GitHub Profile
@chriskirknielsen
chriskirknielsen / colomapa.scss
Last active March 26, 2018 21:01
SCSS function to return a colour from a list, in hexidecimal or rgba value
$colors: ( // Define a list of colours to use
'main': #00a39b,
'secondary': #cf0079,
'light': #e6e6e6,
'gray': #686868,
'dark': #161616
);
/** SCSS function to return a colour from a list, in hexidecimal or rgba value
* @param name: key used in the $colors list associated with a hexadecimal colour
@chriskirknielsen
chriskirknielsen / reset-button.css
Created November 25, 2020 16:28
CSS Button Reset
.reset-button {
appearance: none; /* Browser prefixes might be necessary */
display: inline-block;
margin: 0;
padding: 0;
color: inherit;
font-family: inherit;
font-size: 1em;
line-height: 1.2;
@chriskirknielsen
chriskirknielsen / mdn-slabbin.css
Last active April 7, 2022 16:38
MDN Slabbin'
/* Spruces up the MDN site a little with slabs and a touch of colour in the compat table! */
/* Domain: developer.mozilla.org */
:root {
--font-heading: "Zilla Slab", Rockwell, Georgia, serif;
--type-heading-h1: 900 2.25rem/1.138 var(--font-heading);
--type-heading-h2: 700 1.75rem/1.2857 var(--font-heading);
--type-heading-h3: 600 1.5rem/1.2916 var(--font-heading);
--type-heading-h6: 700 0.8925rem/1.0833 var(--font-heading);
@chriskirknielsen
chriskirknielsen / mastodon-expanded-composer.css
Last active November 19, 2022 18:41
Mastodon Expander Composer
.columns-area__panels {
position: relative;
}
.columns-area__panels__pane.columns-area__panels__pane--compositional {
z-index: 1; /* Ensure the left panel is above the rest */
}
.compose-panel {
overflow-y: clip; /* We need to alter the overflow-y: hidden to allow expansion, here `clip` allows overflow-x to stay as `visible` */
@chriskirknielsen
chriskirknielsen / oxford-comma.js
Created June 6, 2023 21:42
Oxford Comma list
/**
* Take a list of items and combine them into a string, with an Oxford comma for the last item.
* @param {string[]} list Items to list into a string.
* @returns {string} Comma-separated list of items.
*/
function toOxfordCommaList(list) {
let strList = '';
if (list.length > 2) {
list[list.length - 1] = `and ${list[list.length - 1]}`; // Inject "and" before the last item
strList = list.join(', ');
@chriskirknielsen
chriskirknielsen / notion.css
Last active October 27, 2023 21:45
notion.so
/* Update view https://gist.github.com/chriskirknielsen/822248b61f2f957a3d58cf2b5eb84d81 */
.notion-scroller.vertical {
scrollbar-gutter: stable;
}
.notion-table-view > .notion-collection_view-block > .notion-table-view-header-row + :empty + div > :not(.notion-table-view-frozen-column-repositioner).notion-collection-item:nth-last-child(odd),
.notion-table-view-frozen-column-repositioner + div:not([class]) ~ .notion-collection-item:nth-child(odd),
.notion-table-row:nth-last-child(odd) {
--row-alt-bg: #222222;
background-color: #222222;
}
@chriskirknielsen
chriskirknielsen / mastodon.social.css
Last active November 10, 2023 19:51
Mastodon.social style improvements
/* Check for updates to this custom sheet
* @link: https://gist.github.com/chriskirknielsen/a23bc197f0c08ef6cbc9101156a99964
*/
/** DARK MODE (default) **/
:root { scrollbar-color: #595aff #313543; }
::-webkit-scrollbar-thumb { background: #595aff; }
::-webkit-scrollbar-track { background: #313543; }
:root {
@chriskirknielsen
chriskirknielsen / untweet.js
Last active December 26, 2023 23:42
Twitter Deleter
function untweet(username, mode = null) {
let currPost;
let currPostSeen;
let loop;
if (!mode) {
mode = (window.location.href.includes(`${username}/with_replies`)) ? 'replies' : 'posts';
}
function deleteMyTweet() {