Skip to content

Instantly share code, notes, and snippets.

View didoo's full-sized avatar

Cristiano Rastelli didoo

View GitHub Profile
import Component from '@glimmer/component';
export default class extends Component {
}
@didoo
didoo / input.scss
Created November 24, 2021 18:39
Generated by SassMeister.com.
.baz,
.bar {
@at-root foo#{&} {
color: baz;
}
}
@didoo
didoo / input.scss
Created November 24, 2021 18:39
Generated by SassMeister.com.
// ----
// Compass (v1.0.1)
// ----
.baz,
.bar {
@at-root foo#{&} {
color: baz;
}
}
@didoo
didoo / style-dictionary-config-desktop.json
Created April 20, 2020 08:59
Answer in Medium article on Design Tokens - Approach B
{
"source": ["tokens_desktop/spacing.json", "tokens_button.json"],
"platforms": {
"desktop": {
"transformGroup": "desktop",
"buildPath": "build/desktop/",
"files": [{
"destination": "tokens.ext",
"format": "my/format"
}]
@didoo
didoo / tokens-approach-A.json
Last active April 20, 2020 08:45
Answer in Medium article on Design Tokens - Approach A
{
"button": {
"text-icon-spacing": {
"mobile": {
"value": "8",
"type": "size"
},
"desktop": {
"value": "12",
"type": "size"
@didoo
didoo / git-log-parser.js
Created January 25, 2019 16:52
Git Log Parser & Aggregator
/* eslint-env node */
/* eslint-disable no-console, dot-notation */
const fse = require('fs-extra');
const readline = require('readline');
// const platform = 'mw_less';
// const platform = 'mw_scss';
const platform = 'cosmos';
@didoo
didoo / groupErrors.js
Created October 21, 2018 10:39
groupErrors.js suggestion
var chalk = require('chalk');
var groupedErrors = {};
var GroupErrors = {
GROUP: {
PropertyReferenceErrors: 'Property Reference Errors',
PropertyValueCollisions: 'Property Value Collisions',
},
@didoo
didoo / styleguide-frame.css
Last active February 26, 2020 10:20
styleguide-frame.css
.styleguide-frame {
position: relative;
transform: translate3d(0, 0, 0); /* <-- THIS LINE MAKES THE TRICK! */
outline: 1px solid #eaeaea;
}
@didoo
didoo / setupIFrame.js
Created April 6, 2018 00:10
setupIFrame.js
function setupIFrame(container) {
// create the iframe element
const iFrame = document.createElement('iframe');
iFrame.id = 'styleguide-iframe-' + Math.random().toString(36).substring(2, 10);
iFrame.src = 'about:blank';
iFrame.setAttribute('allowfullscreen', '');
iFrame.setAttribute('frameBorder', '0');
// inject it in the DOM
container.parentNode.insertBefore(iFrame, container);
// store a reference to the iFrame "document" element
@didoo
didoo / SassMeister-input.scss
Last active December 9, 2016 19:19
Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
.block {
display: block;
@at-root {