Skip to content

Instantly share code, notes, and snippets.

View jensgro's full-sized avatar

Jens Grochtdreis jensgro

View GitHub Profile
<html>
<head>
<title>Click me if you can</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
@jensgro
jensgro / style.css
Created May 10, 2023 15:29 — forked from AlexWebLab/style.css
Retina displays CSS background image
.logo_background {
background-image: url('../img/logo@1x.png');
background-position: center center;
background-repeat: no-repeat;
background-size: 80px 40px; /* size of the logo image @ 1x */
}
@media /* only for retina displays */
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2),
only screen and (min-device-pixel-ratio: 2),
@jensgro
jensgro / input.scss
Created April 27, 2023 08:43
Generated by SassMeister.com.
// entnommen: https://github.com/jensgro/11ty-starter
// ======= Farben
$custom-colors: (
"black": (
"base": #000
),
"white": (
"base": #fff,
"nearly": #fafafa
),
@jensgro
jensgro / input.scss
Created April 26, 2023 13:52
Generated by SassMeister.com.
// entnommen: https://github.com/jensgro/11ty-starter
// ======= Farben
$custom-colors: (
"black": (
"base": #000
),
"white": (
"base": #fff,
"nearly": #fafafa
),
@jensgro
jensgro / input.scss
Created April 26, 2023 13:50
Generated by SassMeister.com.
// entnommen: https://github.com/jensgro/11ty-starter
// ======= Farben
$custom-colors: (
"black": (
"base": #000
),
"white": (
"base": #fff,
"nearly": #fafafa
),
@jensgro
jensgro / input.scss
Created April 26, 2023 13:46
Generated by SassMeister.com.
$fonts: (
Thin: 100,
ThinItalic: 100,
ExtraLight: 200,
ExtraLightItalic: 200,
Light: 300,
LightItalic: 300,
Regular: 400,
Italic: 400,
Medium: 500,
@jensgro
jensgro / .eleventy.js
Created March 21, 2023 21:17 — forked from sombriks/.eleventy.js
custom eleventy filter to count posts by year #eleventy #ssg
//...
eleventyConfig
.addFilter('yearTags', posts => {
const yearsList = posts.map(p => p.data.date.getFullYear())
const yearsCount = {}
yearsList.forEach(y => {
if (!yearsCount[y]) yearsCount[y] = 1
else yearsCount[y]++
});
return Object.keys(yearsCount)
/* version from https://kittygiraudel.com/snippets/sr-only-class/ */
.sr-only {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
overflow: hidden !important;
margin: -1px !important;
@jensgro
jensgro / scrape-pens.md
Last active March 1, 2023 20:32
save a json-file with all public or private pens from Codepen
@jensgro
jensgro / _propmap.scss
Created February 22, 2023 13:05 — forked from DaveKin/_propmap.scss
Utility SASS mixin to convert a map of property names and values to CSS
/**
* Converts a SASS map of css property names and values into CSS output.
* Properties named `description` will have their value inserted as comments.
*
* Nested maps will be processed recursively.
*
* @param {map} $map the map of properties to output
*/
@mixin map-to-props($map){
@if type-of($map) == map {