Skip to content

Instantly share code, notes, and snippets.

View rolandixor's full-sized avatar

Roland L. Taylor (RolandiXor) rolandixor

View GitHub Profile
@kkemple
kkemple / DarkModeImage.js
Created November 28, 2021 18:43
An image component that supports different images for dark mode.
export default function DarkModeImage({ light, dark, alt }) {
return (
<picture>
<source srcSet={dark} media="(prefers-color-scheme: dark)" />
<img src={light} alt={alt} />
</picture>
);
}
@nicorellius
nicorellius / css_fix_missing_semicolon_regex.txt
Last active March 2, 2022 12:00
REGEX to find missing semicolon in CSS and replace in PHPStorm IDE
(?<=\w[^,;{}])$