Skip to content

Instantly share code, notes, and snippets.

@luiz
luiz / preprocess-sass.ts
Last active August 12, 2019 15:37
Code that does not compile with Svelte 3.8.0 and Typescript 3.5.3
import * as sass from 'node-sass';
import * as svelte from 'svelte/compiler';
import * as fs from 'fs';
import { promisify } from 'util';
const renderSass = promisify(sass.render);
const readFile = promisify(fs.readFile);
const preprocessSass = async (data: string) => {
const result = await renderSass({ data });
@luiz
luiz / menu-example.html
Last active February 1, 2016 23:04
Example of menu tag usage
<article>
<h1>Using the correct tags in HTML</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In et iaculis
risus. Quisque quis magna diam. Suspendisse aliquet urna eu erat pretium, et
scelerisque odio pulvinar. Nullam fermentum diam nibh, vel eleifend ipsum
tempus ut. Nunc accumsan ligula eget tellus vestibulum, sit amet euismod quam
molestie. Integer feugiat urna sed enim hendrerit vestibulum. Suspendisse
ullamcorper, nisi non mollis eleifend, est nunc sagittis augue, nec convallis
eros est ultrices sem. Curabitur pretium condimentum nulla. Sed convallis augue
vitae metus interdum commodo nec in nulla. Vivamus vulputate eleifend semper.
@luiz
luiz / dabblet.css
Created December 11, 2014 13:56
CSS text balloon using variables, calc and transform
/* CSS text balloon using variables, calc and transform */
@import url(http://fonts.googleapis.com/css?family=Chewy);
div {
--balloon-color: #FFF;
--balloon-border: 3px;
position: relative;
top: 1em;
left: 1em;
@luiz
luiz / dabblet.css
Last active August 29, 2015 14:10
Pulsating multiple borders with box-shadow & var
/* Pulsating multiple borders with box-shadow & var */
body {
--bg: #6495ED;
background-color: var(--bg);
}
div {
--border-size: 4px;
width: 50%;
height: 10em;
background-color: white;
@luiz
luiz / dabblet.css
Created November 28, 2014 17:34
transform order test
/* transform order test */
html,body {
height: 100%;
margin: 0;
padding: 0;
}
div {
width: 100px;
height: 100px;
background: red;
@luiz
luiz / async-define.js
Last active August 29, 2015 14:09 — forked from sergiolopes/async-define.js
AMD-compatible 'define' with async and exports support
/*
AMD-compatible async 'define' modularization by sergiolopes and luiz:
https://gist.github.com/luiz/d71c99cf1cda53190e70
Contains the 'define' module syntax compatible with the official API and
support for injecting the 'export' variable and a flexible dependency
resolver with no restrictions on how you load your files.
This implementation doesn't load your JS files so you have to do it. You
can bundle one big file, load multiple files, load them asynchronously, out
@luiz
luiz / dabblet.css
Created October 27, 2014 14:19
:lang pseudoclass tests
/* :lang pseudoclass tests */
:lang(fr) > p {
background-color: yellow;
}
:lang(fr) > strong {
font-style: italic;
}
strong:lang(pt) {
color: red;
}
@luiz
luiz / dabblet.css
Created August 11, 2014 20:24 — forked from anonymous/dabblet.css
Untitled
html,body {
height: 100%;
}
body:before {
content: '';
height: 100%;
display: inline-block;
vertical-align: middle;
}
meter {
@luiz
luiz / dabblet.css
Created July 8, 2014 00:35 — forked from anonymous/dabblet.css
Untitled
.container {
border: 2px solid black;
text-align-last: justify;
margin: 0;
padding: 0;
}
.content {
width: 20%;
display: inline-block;
height: 100px;
@luiz
luiz / dabblet.css
Created June 26, 2014 16:55
Untitled
body { overflow-y: scroll; }
.caixas {
background-color: #ffc;
margin: 0;
padding: 0;
}
.caixa {
list-style: none;
border: .4vw solid;
width: 20vw;