Skip to content

Instantly share code, notes, and snippets.

View goodguyry's full-sized avatar

Ryan Domingue goodguyry

View GitHub Profile
@goodguyry
goodguyry / git-prune-merged
Last active January 2, 2024 20:32
Prune merged branches
#!/bin/bash
##
# `git prune-merged`
#
# Prune merged branches.
#
# Available options:
# --dry-run Dry run
# -h Show usage help
@goodguyry
goodguyry / input.scss
Created October 14, 2021 19:08
Generated by SassMeister.com.
// min() function has to be escaped in Libsass.
div {
/* Libsass strips the '+' */
broken: \min(100% + var(--test), 1000px);
/* Put it back as an unquoted string */
unqoute: \min(100% unquote('+') var(--test), 1000px);
/* Or nest a calc() function, which isn't necessary according to the min() spec. */
calc: \min(calc(100% + var(--test)), 1000px);
@goodguyry
goodguyry / input.scss
Created October 14, 2021 19:03
Generated by SassMeister.com.
// min() function has to be escaped in Libsass.
div {
// Libsass strips the '+'
broken: \min(100% + var(--test), 1000px);
// Put it back with an unquoted string
unqoute: \min(100% unquote('+') var(--test), 1000px);
// Or nest a calc() function, which isn't necessary accroding to the min() spec.
calc: \min(calc(100% + var(--test)), 1000px);
@goodguyry
goodguyry / input.scss
Created October 14, 2021 19:01
Generated by SassMeister.com.
// min() function has to be escaped in node-sass.
div {
// Sass strips the '+'
broken: \min(100% + var(--test), 1000px);
// Put it back with an unquoted string
unqoute: \min(100% unquote('+') var(--test), 1000px);
// Or nest a calc() function, which isn't necessary accroding to the min() spec.
calc: \min(calc(100% + var(--test)), 1000px);
@goodguyry
goodguyry / input.scss
Created August 4, 2021 00:11
Generated by SassMeister.com.
/**
* Convert px to rem or em. Unitless values are assumed to be in px.
*
* @param {Number} $px Single value to convert.
* @param {Boolean} $em Use `em` units if true.
* @param {Number} $base-size Root font size on which to base conversions.
*
* @returns {String} A r?em value.
*/
@function _px-to-relative($px, $em, $base-size) {
@goodguyry
goodguyry / input.scss
Created May 28, 2021 00:41
Generated by SassMeister.com.
@mixin is-any-matches($selector-list...) {
:-webkit-any(#{$selector-list}) {
@content;
}
:-moz-any(#{$selector-list}) {
@content;
}
:matches(#{$selector-list}) {
@goodguyry
goodguyry / input.scss
Created April 24, 2021 15:16
Generated by SassMeister.com.
@mixin for-all-headings() {
// h1,
// h2,
// h3,
// h4,
// h5,
// h6 {
// @content;
// }
@goodguyry
goodguyry / input.scss
Created March 5, 2021 23:56
Generated by SassMeister.com.
@mixin override-plugin-styles {
$sidebar-selector: ':global .specific-selector';
// Check for a parent selector so we can use it in the root if needed.
$selector: if(
'' == '#{&}',
$sidebar-selector,
selector-nest($sidebar-selector, ':local #{&}')
);
@goodguyry
goodguyry / input.scss
Created March 5, 2021 23:51
Generated by SassMeister.com.
@mixin override-plugin-styles {
$sidebar-selector: ':global .plugin-en-infomaker-oovvuu';
// Check for a parent selector so we can use it in the root if needed.
$selector: if(
'' == '#{&}',
$sidebar-selector,
selector-nest($sidebar-selector, ':local #{&}')
);
@goodguyry
goodguyry / settings.json
Created October 8, 2017 00:30
VS Code settings
{
"eslint.run": "onSave",
"eslint.autoFixOnSave": true,
"eslint.enable": true,
"css.validate": false,
"scss.validate": false,
"editor.fontFamily": "Hack",
"editor.fontSize": 10,
"editor.tabSize": 2,
"editor.renderWhitespace": "all",