Skip to content

Instantly share code, notes, and snippets.

View MrGrigri's full-sized avatar
🛠️
working hard

Michael Richins MrGrigri

🛠️
working hard
View GitHub Profile
@MrGrigri
MrGrigri / style.css
Last active June 10, 2025 18:15
grid auto-fit and auto-fill
@property --min-inline-size {
syntax: "<length>";
inherits: false;
initial-value: 100px;
}
.container {
display: grid;
grid-template-rows: var(--min-inline-size);
grid-auto-rows: var(--min-inline-size);
@MrGrigri
MrGrigri / konami.service.ts
Last active February 23, 2025 21:41
Angular Konami Service
import { isPlatformBrowser } from '@angular/common';
import {
EventEmitter,
inject,
Injectable,
Output,
PLATFORM_ID,
} from '@angular/core';
@Injectable({ providedIn: 'root' })
@MrGrigri
MrGrigri / README.md
Last active June 10, 2025 17:21
Light Dark Color scheme/palette
@MrGrigri
MrGrigri / new-reset.css
Last active June 19, 2025 17:25
Modern CSS Reset
@layer reset {
:root {
--_body-font-family: var(--reset-body-font-family, sans-serif);
--_heading-font-family: var(--reset-heading-font-family, serif);
--_code-font-family: var(--reset-code-font-family, monospace);
--_text-max-width: var(--reset-text-max-width, 65ch);
--_details-duration: var(--reset-details-duration, 175ms);
--_details-timing: var(--reset-details-timing, ease-out);
@MrGrigri
MrGrigri / README.md
Last active April 23, 2024 16:10
Vanilla JavaScript Router

Simple vanilla JavaScript router

This is a very minimal router to be used in a vanilla JavaScript project. There are only two exposed functions and one options object.

I have used this with a simple ViteJs web server.

Functions

initializeRoutes(routes, options): This function will initialize the routing. A routes object must be passed as well as an optional options object. goToRoute(route): This function is to be called in JavaScript and will navigate to the route.

@MrGrigri
MrGrigri / animated-outline.css
Last active October 19, 2022 23:20
Used to animate the outline offset when an interactive element receives focus only when it's visible.
:root {
--outline-color: #346ebd;
--outline: 2px solid var(--outline-color);
}
* {
outline-offset: -2px;
}
*:not(:active):focus-visible {
@MrGrigri
MrGrigri / HTML Datalist of US States
Last active September 23, 2022 14:26
List of US State in HTML Datalist format. Other list are: territories, federal district, and military shipping areas
<datalist id="us_states">
<option value="al" label="Alabama">Alabama</option>
<option value="ak" label="Alaska">Alaska</option>
<option value="az" label="Arizona">Arizona</option>
<option value="ar" label="Arkansas">Arkansas</option>
<option value="ca" label="California">California</option>
<option value="co" label="Colorado">Colorado</option>
<option value="ct" label="Connecticut">Connecticut</option>
<option value="de" label="Delaware">Delaware</option>
<option value="fl" label="Florida">Florida</option>
@MrGrigri
MrGrigri / uuid.service.ts
Last active July 2, 2019 15:55
Simple Angular UUID management service. This ensures that a UUID is unique to the application by tracking all UUIDs in an app.
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class IdService {
public ids: string[] = [];
constructor() {}
@MrGrigri
MrGrigri / md-color-palette.css
Last active October 23, 2024 02:12
Material Design Color Palette in CSS Variable Form
:root {
--material-color-red: #f44336;
--material-color-red-50: #ffebee;
--material-color-red-100: #ffcdd2;
--material-color-red-200: #ef9a9a;
--material-color-red-300: #e57373;
--material-color-red-400: #ef5350;
--material-color-red-500: var(--material-color-red);
--material-color-red-600: #e53935;
--material-color-red-700: #d32f2f;
@MrGrigri
MrGrigri / gist-reveal.it-slides.html
Last active March 1, 2018 16:28 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered by Mike</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>