Skip to content

Instantly share code, notes, and snippets.

View michventura's full-sized avatar
🎯
Focusing

Michel michventura

🎯
Focusing
  • Mexico
View GitHub Profile
*,
*::before,
*::after {
box-sizing: border-box;
}
body,
h1,
h2,
h3,
@michventura
michventura / displayprop.css
Created February 17, 2022 23:26
Estilos de displayprops
:root {
--clr-block: #7f1d1d;
--clr-block-bg: #fca5a5;
--clr-inline: #1e3a8a;
--clr-inline-bg: #93c5fd;
--clr-flex: #064e3b;
--clr-flex-bg: #6ee7b7;
--clr-grid: #701a75;
--clr-grid-bg: #f0abfc;
}
@michventura
michventura / displayprop.js
Last active February 17, 2022 23:30
Script para dar clic en elementos y mostrar su propiedad de display
document.addEventListener('DOMContentLoaded', () => {
function getDisplayValue(element) {
let displayValue = window.getComputedStyle(element.target).display
return displayValue
}
document.body.querySelectorAll('*').forEach(element =>
element.addEventListener('click', e => {
let value = getDisplayValue(e)
if (value === 'inline') {
e.target.classList.toggle('outlineInline')
@michventura
michventura / utilities.css
Created February 8, 2022 05:34
Utility classes
/* Utilities */
.flex {
display: flex;
gap: var(--gap, 1rem);
}
.grid {
display: grid;
gap: var(--gap, 1rem);
}
@michventura
michventura / reset.css
Created February 8, 2022 05:29
Bare reset
/* Reset */
*,
*::before,
*::after {
box-sizing: border-box;
}
body,
h1,
h2,
@michventura
michventura / dabblet.css
Last active October 1, 2021 17:50
Untitled
:root {
--clr-primary: hsl(250 30% 40%);
--clr-secondary: hsl(190 40% 40%);
--clr-bg: hsl(0 0% 100% / .8);
}
h1 {
color: var(--clr-secondary);
padding-inline-start: 1rem;
}
@michventura
michventura / orden.txt
Last active September 8, 2021 18:01
Orden propiedades CSS
/*
* Orden ideal de acomodo de propiedades de CSS
*
* 1. Propiedades de display
* 2. Propiedades de position
* 3. Propiedades de box model
* 4. Propiedades de tipografia
* 5. Propiedades de manipulacion
* 5. Propiedades diversas
*/
/****************************************
* Variables
*****************************************/
:root {
/* Colores */
/* cambia los siguientes valores por los de tu styleguide */
/*
--primario: #6836e1;
--primario-light: #9b76eb;
--primario-dark: #3b22cb;
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
* * * * * * * { background-color: rgba(255,0,0,.2); }
* * * * * * * * { background-color: rgba(0,255,0,.2); }
* * * * * * * * * { background-color: rgba(0,0,255,.2); }