Skip to content

Instantly share code, notes, and snippets.

View JoeCianflone's full-sized avatar

Joe Cianflone JoeCianflone

View GitHub Profile
@JoeCianflone
JoeCianflone / input.scss
Created September 28, 2022 15:59
Generated by SassMeister.com.
@use 'sass:selector';
@use 'sass:list';
@use 'sass:string';
@function replace($string, $search, $replace: '') {
$index: string.index($string, $search);
@if $index {
@return string.slice($string, 1, $index - 1) + $replace + replace(string.slice($string, $index + string.length($search)), $search, $replace);
}
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
@JoeCianflone
JoeCianflone / input.scss
Created May 30, 2021 17:52
Generated by SassMeister.com.
@mixin when($parent-selector, $child: &) {
@at-root {
#{$parent-selector} #{$child} {
@extend #{$child};
@content;
}
}
}
.foo {
@JoeCianflone
JoeCianflone / input.scss
Created May 26, 2021 16:39
Generated by SassMeister.com.
@mixin when($parent-selector, $child: &) {
@at-root {
#{$parent-selector} #{$child} {
@extend #{$child};
@content;
}
}
}
.media {
@JoeCianflone
JoeCianflone / input.scss
Created November 5, 2020 15:17
Generated by SassMeister.com.
$mq: ("xs": #{"min-width: 480px"});
@mixin at-size($size) {
&\:#{$size} {
@content;
}
}
@mixin for-variant($parent) {
&\:#{$parent} {
@JoeCianflone
JoeCianflone / input.scss
Last active November 5, 2020 14:52
Generated by SassMeister.com.
$mq: (
'xs': #{'min-width: 480px'},
);
@mixin at-size($size) {
&\:#{$size} {
@content;
}
}
@JoeCianflone
JoeCianflone / input.scss
Last active November 4, 2020 21:28
Generated by SassMeister.com.
$mq: (
'xs': #{'min-width: 480px'},
);
@mixin at-size($size) {
&\:#{$size} {
@content;
}
}
@JoeCianflone
JoeCianflone / input.scss
Created November 4, 2020 15:19
Generated by SassMeister.com.
$mq: (
'xs': #{'min-width: 480px'},
);
@mixin at-size($size) {
&\:#{$size} {
@content;
}
}
@JoeCianflone
JoeCianflone / input.scss
Created November 4, 2020 15:19
Generated by SassMeister.com.
$mq: (
'xs': #{'min-width: 480px'},
);
@mixin at-size($size) {
&\:#{$size} {
@content;
}
}
@JoeCianflone
JoeCianflone / input.scss
Created November 4, 2020 14:45
Generated by SassMeister.com.
$mq: (
'xs': #{'min-width: 480px'},
'sm': #{'min-width: 576px'},
'md': #{'min-width: 768px'},
'wd': #{'min-width: 900px'},
'xw': #{'min-width: 1024px'},
'lg': #{'min-width: 1280px'},
'xl': #{'min-width: 1366px'},
);