Skip to content

Instantly share code, notes, and snippets.

View IpsumLorem16's full-sized avatar
:octocat:

IpsumLorem16

:octocat:
View GitHub Profile
@IpsumLorem16
IpsumLorem16 / GetClasses.js
Last active January 9, 2019 10:26
Gets all CSS classes in stylesheets and puts them into array Vanilla JS
let cssArray = [];
for (var i = 0; i < document.styleSheets.length; i++) {
var styleSheet = document.styleSheets[i];
for (var j = 0; j < 1; j++) {
let cssRules = styleSheet.cssRules;
for (var n = 0; n < cssRules.length; n++) {
cssArray.push(cssRules[n].selectorText);
}
@IpsumLorem16
IpsumLorem16 / speech-synthesis-api-test.js
Last active March 15, 2020 13:24
Test of the speech synthesis api
//should speak in a british voice
// https://developers.google.com/web/updates/2014/01/Web-apps-that-talk-Introduction-to-the-Speech-Synthesis-API
var msg = new SpeechSynthesisUtterance();
var voices = window.speechSynthesis.getVoices();
msg.voice = voices[4]; // Note: some voices don't support altering params
msg.voiceURI = 'native';
msg.volume = 1; // 0 to 1
msg.rate = 1; // 0.1 to 10
msg.pitch = 1; //0 to 2
msg.text = ' This is a test';
@IpsumLorem16
IpsumLorem16 / cyberpunk-animated-svg-logo-fork.markdown
Created April 18, 2021 12:28
Cyberpunk animated SVG logo {fork}

Cyberpunk animated SVG logo {fork}

Using CSS and SVG filters to animate this Cyber punk logo.

Click, or hold down the mouse button.

A Pen by IpsumLorem16 on CodePen.

License.

@IpsumLorem16
IpsumLorem16 / index.html
Created April 18, 2021 12:53
Simple custom radio buttons
<div class="radio-wrapper">
<fieldset>
<legend>Select a maintenance drone:</legend>
<div class="custom-radio">
<input class="visually-hidden" type="radio" id="huey" name="drone" value="huey">
<label for="huey">
<span class="input-circle"></span>
Huey
</label>
</div>
@IpsumLorem16
IpsumLorem16 / custom-radio-buttons-emoji-dark.markdown
Created April 18, 2021 12:53
Custom Radio buttons (emoji-dark)
@IpsumLorem16
IpsumLorem16 / custom-accessible-radio-buttons-emoji.markdown
Created April 18, 2021 12:54
Custom Accessible Radio buttons (emoji)
@IpsumLorem16
IpsumLorem16 / index.html
Created April 18, 2021 12:54
radio selector for Pokemon
<fieldset>
<legend>Select A Pokémon</legend>
<div id="pokemon-selectors" class="pokemon-container">
<div class="radio-container">
<input type="radio" name="pokemon-select" id="pikachu" value="pikachu" class="visually-hidden">
<label for="pikachu">
<span class="selected-txt-container" aria-hidden="true">
<span class="selected-txt">
Selected
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
@IpsumLorem16
IpsumLorem16 / index.html
Created April 18, 2021 12:55
SVG circle spinner (css keyframes only)
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<circle
class="ring-track"
fill="transparent"
stroke-width="6px"
stroke="#9c9c9c30"
cx="50" cy="50"
r="44"
/>
<circle
@IpsumLorem16
IpsumLorem16 / index.html
Created April 18, 2021 12:55
simple SVG shapes [animated]
<svg xmlns="http://www.w3.org/2000/svg" width="384" height="158" viewBox="0 0 384 158" fill="none">
<g id="squares">
<rect x="36" y="13" width="100" height="100" fill="#FF5555" />
<rect x="10" y="46" width="100" height="100" fill="#DD3030" />
</g>
<circle id="circle" cx="209" cy="79" r="50" fill="#F29F21" />
<path id="triangle" d="M319 36L370.962 126H267.038L319 36Z" fill="#1DCF8F"/>
</svg>
@IpsumLorem16
IpsumLorem16 / index.html
Created April 18, 2021 12:55
simple SVG shapes
<svg xmlns="http://www.w3.org/2000/svg" width="384" height="158" viewBox="0 0 384 158" fill="none">
<g id="squares">
<rect x="36" y="13" width="100" height="100" fill="#FF5555" />
<rect x="10" y="46" width="100" height="100" fill="#DD3030" />
</g>
<circle id="circle" class="shape" cx="209" cy="79" r="50" fill="#F29F21" />
<path id="triangle" class="shape" d="M319 36L370.962 126H267.038L319 36Z" fill="#1DCF8F"/>
</svg>