Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabien tunguskha

View GitHub Profile
@tunguskha
tunguskha / country-name-to-iso.js
Created October 16, 2019 14:37
Javascript country name to ISO country code conversion
View country-name-to-iso.js
var isoCode = {
'Afghanistan': 'AF',
'Aland Islands': 'AX',
'Albania': 'AL',
'Algeria': 'DZ',
'American Samoa': 'AS',
'Andorra': 'AD',
'Angola': 'AO',
'Anguilla': 'AI',
'Antarctica': 'AQ',
@tunguskha
tunguskha / CSS-color-var.md
Last active December 27, 2022 21:48
Darken & Lighten colors in pure CSS using variables.
View CSS-color-var.md
:root {
  /* Base color using HSL */
  --hue: 207;
  --saturation: 64%;
  --light: 44%;
  
  /* Base color in variable */
  --primary-color: hsl(var(--hue), var(--saturation), var(--light));
 /* Base color lighten using calc */
@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active May 4, 2023 06:40
Gradient shadow in pure CSS
View Gradient shadow in pure CSS.md

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@tunguskha
tunguskha / How to couple Sass and CSS Variables.md
Last active March 19, 2019 22:42
How to couple Sass and CSS Var
View How to couple Sass and CSS Variables.md

How to couple Sass and CSS Var

If you use Sass extension, you can work with CSS variables.

First, let's create our css variable.

\:root
  --MyColor: #5966D2