2022-02-07 03:14:31 +01:00
|
|
|
---
|
|
|
|
layout: base.njk
|
|
|
|
title: Playground
|
|
|
|
css: ["/css/playground.css"]
|
|
|
|
---
|
|
|
|
{# css: ["/css/reset.css", "/css/playground.css"]
|
|
|
|
#}
|
|
|
|
{# <link rel="stylesheet" href="./css/reset.css"> #}
|
|
|
|
{# <link rel="stylesheet" href="./css/playground.css"> #}
|
2022-01-30 21:17:24 +01:00
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<h1>Tricks</h1>
|
2022-01-30 21:17:24 +01:00
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<h2>Gradient text with CSS</h2>
|
2022-01-30 21:17:24 +01:00
|
|
|
This one comes from Kevin Powell, on a YouTube video short <a
|
|
|
|
href="https://www.youtube.com/watch?v=IQT4aI_Iup4">"Gradient text with CSS | CSS Tip of the Day"</a>. It applies
|
|
|
|
a colored gradient to text.
|
2021-08-11 09:34:00 +02:00
|
|
|
|
|
|
|
Note that the -webkit- is needed to make this trick work in Safari.
|
|
|
|
|
|
|
|
<h1 class="gradient-text">Thingy Text thats with a gradient</h1>
|
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<h2>Tip for screen sized approriate images</h2>
|
2022-01-30 21:17:24 +01:00
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-480.jpg" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-960.jpg 2x,
|
2022-01-30 21:17:24 +01:00
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-1440.jpg 3x,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-1920.jpg 4x" alt="shiny black dog looking pensive"
|
|
|
|
width="480" height="360">
|
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<pre>
|
2022-01-30 21:17:24 +01:00
|
|
|
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-480.jpg"
|
|
|
|
srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-960.jpg 2x,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-1440.jpg 3x,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog-1920.jpg 4x"
|
|
|
|
alt="shiny black dog looking pensive"
|
|
|
|
width="480" height="360">
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
Better though is
|
|
|
|
|
|
|
|
<picture>
|
2022-02-07 03:14:31 +01:00
|
|
|
<source media="(min-width:600px)" srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-320.jpg 320w,
|
2022-01-30 21:17:24 +01:00
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-480.jpg 480w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-720.jpg 720w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-960.jpg 960w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-1440.jpg 1440w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-1920.jpg 1920w">
|
2022-02-07 03:14:31 +01:00
|
|
|
<source srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-320.jpg 320w,
|
2022-01-30 21:17:24 +01:00
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-480.jpg 480w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-720.jpg 720w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-960.jpg 960w">
|
2022-02-07 03:14:31 +01:00
|
|
|
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-480.jpg" alt="smiling black dog"
|
2022-01-30 21:17:24 +01:00
|
|
|
height="360px" width="480px">
|
2022-02-07 03:14:31 +01:00
|
|
|
</picture>
|
2022-01-30 21:17:24 +01:00
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<pre>
|
2022-01-30 21:17:24 +01:00
|
|
|
<picture>
|
|
|
|
<source media="(min-width:600px)"
|
|
|
|
srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-320.jpg 320w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-480.jpg 480w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-720.jpg 720w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-960.jpg 960w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-1440.jpg 1440w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-1920.jpg 1920w" >
|
|
|
|
<source srcset="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-320.jpg 320w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-480.jpg 480w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-720.jpg 720w,
|
|
|
|
https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-cropped-960.jpg 960w" >
|
|
|
|
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/dog2-480.jpg"
|
|
|
|
alt="smiling black dog"
|
|
|
|
height="360px" width="480px">
|
|
|
|
</picture>
|
|
|
|
</pre>
|
|
|
|
|
2022-02-07 03:14:31 +01:00
|
|
|
<h2>???</h2>
|