diff --git a/3Dtransforms/index.html b/3Dtransforms/index.html index 6aa4f96..9676dfc 100644 --- a/3Dtransforms/index.html +++ b/3Dtransforms/index.html @@ -24,7 +24,7 @@

CSS 3D transforms allow us to rotate elements in (so perceived) third dimension
All that is really needed is a simple transform method such as rotate{X,Y,Z}() that takes exactly one argument - the amount of wanted rotation.

a note about Fira Code

-

The h1 font inside the divs below is specified as Fira Code Retina, so in case you don't have it installed, the glyphs won't show up nicely. I recommend you check it out.
I am planning on adding it to the site, though.
That way you don't have to have it installed on your device.

+

The h1 font inside the divs below is specified as Fira Code Retina, so in case you didn't have it installed, the glyphs wouldn't show up nicely.
I added it to the site, though.
That way you don't have to have it installed on your device.
To understand why "ss07", "zero" was used you can read this.

<~~ rotate X ~~>

A div rotated along its x-axis

@@ -46,7 +46,9 @@ opacity: 0.95; } #div3dtransformrotate-x h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; }

<~~ rotate Y ~~>

@@ -70,7 +72,9 @@ opacity: 0.95; } #div3dtransformrotate-y h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; }

<~~ rotate Z ~~>

@@ -94,7 +98,9 @@ opacity: 0.95; } #div3dtransformrotate-z h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } diff --git a/animations/index.html b/animations/index.html index 83ecb7d..1fac197 100644 --- a/animations/index.html +++ b/animations/index.html @@ -39,7 +39,9 @@ opacity: 0.95; } #divanimate-shrug h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-shrug { 0% { @@ -77,7 +79,9 @@ opacity: 0.95; } #divanimate-x h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-x { 0% { @@ -110,7 +114,9 @@ opacity: 0.95; } #divanimate-y h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-y { 0% { @@ -143,7 +149,9 @@ opacity: 0.95; } #divanimate-z h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-z { 0% { diff --git a/css/fira_code.css b/css/fira_code.css new file mode 100644 index 0000000..8bb4114 --- /dev/null +++ b/css/fira_code.css @@ -0,0 +1,42 @@ +@font-face { + font-family: 'Fira Code'; + src: url('/fonts/woff2/FiraCode-Light.woff2') format('woff2'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('/fonts/woff2/FiraCode-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('/fonts/woff2/FiraCode-Medium.woff2') format('woff2'); + font-weight: 500; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('/fonts/woff2/FiraCode-SemiBold.woff2') format('woff2'); + font-weight: 600; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code'; + src: url('/fonts/woff2/FiraCode-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: 'Fira Code VF'; + src: url('/fonts/woff2/FiraCode-VF.woff2') format('woff2-variations'); + /* [> font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes <] */ + font-weight: 300 700; + font-style: normal; +} diff --git a/css/style.css b/css/style.css index ab3b4eb..5342408 100644 --- a/css/style.css +++ b/css/style.css @@ -1,4 +1,5 @@ @charset "UTF-8"; +@import "fira_code.css"; body { background: #2b2b2b; @@ -329,7 +330,9 @@ pre { opacity: 0.95; } #div3dtransformrotate-x h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } #div3dtransformrotate-y { @@ -350,7 +353,9 @@ pre { opacity: 0.95; } #div3dtransformrotate-y h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } #div3dtransformrotate-z { @@ -371,7 +376,9 @@ pre { opacity: 0.95; } #div3dtransformrotate-z h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } #divanimate-shrug { @@ -387,7 +394,9 @@ pre { opacity: 0.95; } #divanimate-shrug h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-shrug { 0% { @@ -422,7 +431,9 @@ pre { opacity: 0.95; } #divanimate-x h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-x { 0% { @@ -452,7 +463,9 @@ pre { opacity: 0.95; } #divanimate-y h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-y { 0% { @@ -482,7 +495,9 @@ pre { opacity: 0.95; } #divanimate-z h1 { - font-family: 'Fira Code Retina' + font-family: 'Fira Code Retina'; + text-rendering: optimizeLegibility; + font-feature-settings: "ss07", "zero"; } @keyframes rotate-z { 0% { diff --git a/deploy b/deploy index 3814cef..18dba38 100644 --- a/deploy +++ b/deploy @@ -7,7 +7,7 @@ PUBDIR=$HOME/tew_0x00public/ rm -rfv ../tew_0x00/public mkdir -pv ../tew_0x00/public -rsync -av index.html scripts css media \ +rsync -av index.html scripts css media fonts \ roundedcorners backgroundgradient shadows \ 2Dtransforms 3Dtransforms transitions animations \ multiplecolumns boxsizing flexbox \ diff --git a/fonts/woff2/FiraCode-Bold.woff2 b/fonts/woff2/FiraCode-Bold.woff2 new file mode 100644 index 0000000..36929a3 Binary files /dev/null and b/fonts/woff2/FiraCode-Bold.woff2 differ diff --git a/fonts/woff2/FiraCode-Light.woff2 b/fonts/woff2/FiraCode-Light.woff2 new file mode 100644 index 0000000..3d9391e Binary files /dev/null and b/fonts/woff2/FiraCode-Light.woff2 differ diff --git a/fonts/woff2/FiraCode-Medium.woff2 b/fonts/woff2/FiraCode-Medium.woff2 new file mode 100644 index 0000000..fa681ee Binary files /dev/null and b/fonts/woff2/FiraCode-Medium.woff2 differ diff --git a/fonts/woff2/FiraCode-Regular.woff2 b/fonts/woff2/FiraCode-Regular.woff2 new file mode 100644 index 0000000..a1b2f4e Binary files /dev/null and b/fonts/woff2/FiraCode-Regular.woff2 differ diff --git a/fonts/woff2/FiraCode-SemiBold.woff2 b/fonts/woff2/FiraCode-SemiBold.woff2 new file mode 100644 index 0000000..6e74790 Binary files /dev/null and b/fonts/woff2/FiraCode-SemiBold.woff2 differ diff --git a/fonts/woff2/FiraCode-VF.woff2 b/fonts/woff2/FiraCode-VF.woff2 new file mode 100644 index 0000000..2d3c687 Binary files /dev/null and b/fonts/woff2/FiraCode-VF.woff2 differ