Skip to content

Instantly share code, notes, and snippets.

View fabiofidanza's full-sized avatar

fabiofidanza

View GitHub Profile
img[style*='float: r'] {
margin: $colPadding 0 $colPadding $colPadding;
}
img[style*='float: l'] {
margin: $colPadding $colPadding $colPadding 0;
}
@fabiofidanza
fabiofidanza / sass-interpolation.scss
Created May 27, 2016 16:10
Sass unicode interpolation
$termsIcons: (
1 : ('e91c','e91d'),
2 : ('e919','e918'),
3 : ('e91e','e91f'),
4 : ('e91a','e91b'),
);
.page-taxonomy-term {
.title-container {
@fabiofidanza
fabiofidanza / burger.scss
Created October 26, 2020 15:16
CSS only no extra element burger
/* hamburger */
&:after, &:before {
content: "";
position: absolute;
right: 0;
top: 50%;
width: $menuUnit * 6;
background: $white;
height: $menuUnit;
\s*<span>\s*(?:[^<]*|(?R))\s*<\/span>\s*
$re = '/\s*<span>\s*(?:[^<]*|(?R))\s*<\/span>\s*/imsU';
<?php
$page = file_get_contents('https://risorse.arcipelagoeducativo.it/risorse/crucipuzzle-dellorientamento');
$title_re = '/<title>([^\/]+)<\/title>/m';
preg_match_all($title_re, $page, $matches, PREG_SET_ORDER, 0);
$title = $matches[0][1];
@fabiofidanza
fabiofidanza / pecetta.css
Last active April 18, 2023 10:00
Cost-example pecetta
.cost-example--value:nth-child(3) {
position: relative;
}
.cost-example--value:nth-child(3)::after {
content: "Il più urgente";
position: absolute;
z-index: 9000;
font-size: 10px;
text-align: center;
.ajax-progress {
position: fixed;
text-align: center;
color: $teal;
padding: 20px 20px 0 20px;
width: auto;
height: auto;
font-weight: 700;
font-size: 5rem;
z-index: 90210;
precalculateColorTransition = function(fromHex, toHex, steps=30) {
const fromRGB = [ parseInt(fromHex.substr(0, 2), 16),
parseInt(fromHex.substr(2, 2), 16),
parseInt(fromHex.substr(4, 2), 16)
];
const toRGB = [ parseInt(toHex.substr(0, 2), 16),
parseInt(toHex.substr(2, 2), 16),
parseInt(toHex.substr(4, 2), 16)
@media only screen and (max-width: 900px) {
* {
display: none;
}
}
@fabiofidanza
fabiofidanza / Blur calendar
Created November 22, 2023 14:33
Blur Google calendar
document.querySelectorAll('*[data-eventchip]').forEach( (e) => {
e.style.filter="blur(4px)";
})