Skip to content

Instantly share code, notes, and snippets.


Fabien tunguskha

View GitHub Profile
View Gradient shadow in pure

Gradient shadow in pure CSS

alt text

<button>Let's Go !</button>
tunguskha /
Last active May 27, 2021
Darken & Lighten colors in pure CSS using variables.
: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 / country-name-to-iso.js
Created Oct 16, 2019
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 / How to couple Sass and CSS
Last active Mar 19, 2019
How to couple Sass and CSS Var
View How to couple Sass and CSS

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.

  --MyColor: #5966D2