Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
@jedfoster
jedfoster / SassMeister-input.scss
Last active June 2, 2024 20:19
JavaScript version of Sass' mix() function
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
body {
width: 100%;
height: 10em;
background: mix(#ff0000, #0000bb, 75);
}
@jedfoster
jedfoster / input.scss
Created January 4, 2024 17:41
Generated by SassMeister.com.
$red: #f00;
.box {
color: $red;
}
@jedfoster
jedfoster / input.scss
Created August 1, 2023 14:32
Generated by SassMeister.com.
//@use 'core/mixins';
//@use 'variables' as *;
$_breakpoints: (
'tablet': 650px,
'desktop': 992px,
'hd': 1280px,
) !default;
@mixin breakpoint($break) {
@jedfoster
jedfoster / input.scss
Created April 5, 2022 15:33
Generated by SassMeister.com.
$size-spacing-xs: 0.5rem;
.overviewLink:hover {
text-decoration: none;
.avatar {
outline-width: ($size-spacing-xs / 2);
outline-width: calc(#{$size-spacing-xs} / 2);
}
}
@jedfoster
jedfoster / input.scss
Created April 5, 2022 15:32
Generated by SassMeister.com.
$size-spacing-xs: 2rem;
.overviewLink:hover {
text-decoration: none;
.avatar {
outline-width: ($size-spacing-xs / 2);
outline-width: calc(#{$size-spacing-xs} / 2);
}
}
import * as path from 'path';
import adapter from '@sveltejs/adapter-auto';
import { markdown } from 'svelte-preprocess-markdown';
const API_BASE = process.env.DEV ? 'http://127.0.0.1:3000' : 'https://api.svelte.dev';
const config = {
kit: {
adapter: adapter(),
vite: () => ({
@jedfoster
jedfoster / javascript.js
Created October 12, 2012 19:47
Textarea selection and caret manipulation with Javascript
HTMLTextAreaElement.prototype.getCaretPosition = function () { //return the caret position of the textarea
return this.selectionStart;
};
HTMLTextAreaElement.prototype.setCaretPosition = function (position) { //change the caret position of the textarea
this.selectionStart = position;
this.selectionEnd = position;
this.focus();
};
HTMLTextAreaElement.prototype.hasSelection = function () { //if the textarea has selection then return true
if (this.selectionStart == this.selectionEnd) {
@jedfoster
jedfoster / Interview Questions.md
Last active October 23, 2021 02:59
Interview Questions
  1. What brings you to web development? What's your goal? What's your passion? What wakes you up in the middle of the night?

  2. Tell me about common themes you run into working in the UI. How did you address them?

    • UX/Design changes?
    • What’s difficult, what’s fun?
    • Localization
  3. What do you do to keep up to date with technology (blogs, conferences, etc)?

    • What blogs do you follow?
    • If you could master one technology this year, what would it be?
@jedfoster
jedfoster / Markdown test.md
Last active November 12, 2020 02:28
Markdown test <b>BOLD</b>

H1: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H2: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H3: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H4: Roughdraft is GitHub Gists, made pretty. #646464

H5: Roughdraft is GitHub Gists, made pretty. #4d4d4d
H6: Roughdraft is GitHub Gists, made pretty. #212121

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

@jedfoster
jedfoster / input.scss
Last active November 12, 2020 00:55 — forked from stof/input.scss
Generated by SassMeister.com.
$cmln-toc-entry-number-padding-right: 1rem;
$selector: "";
@for $i from 1 through 6 {
$selector: "#{$selector} ul li";
#{$selector} a .tocnumber { min-width: $cmln-toc-entry-number-padding-right + 0.25rem + 0.75rem * $i; }
}