// html
<include src='_partial.html'></include>
// sugarml
include(src="_partial.html")
// jade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* breakpoints */ | |
:root { /* px size at 16px base font size */ | |
@custom-media --xs (width < 20em); /* 320px */ | |
@custom-media --s (width < 28em); /* 448px */ | |
@custom-media --m (width < 48em); /* 768px */ | |
@custom-media --l (width < 64em); /* 1024px */ | |
@custom-media --xl (width < 80em); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$camphor300:'d09GMgABAAAAAQ5UABIAAAAEn0QAAQ3tAAEZmQAAAAAAAAAAAAAAAAAAAAAAAAAAG4SkahzOKgZgFotgAIosCCIJgnMRCAqLlgCKvTwBNgIkA5lwE4GnDguZdAAEIAW7bwcgDHJb0WS0WUXZkokWaBHx4wKbY7TigANIU/t980QCGzI/IkCsdbqJZwY1ZOgWDngIamw3I43435Dd+zJ1kNmKVp/DvXNAwaNm//////////////////+/NZkMZ5cAl0CpbZ3oiwloFA5GyIWNzOYVLt1bpXPX+pABI2fo5rMZpgVYIzYqgxt92ajECqUKh2G9gaOCVRC23VSRVypHfbvb7wYcwEM25WArF0esm1yKzDixrJRdcBGtcpBZTFbFbIl8LIU4gWOnEdSITqkoGrHWJ8ywn9eVFWWk3lC6m07qp1TXntHaWp6ekYHLrFoyzOXYiQnn2kWX2zqMaFBTca25vHKndPhJV66HRhQzL9lB3OT20KGTXuFHu62wm1qzoV/iTnaiLdc8o/D7B+1O94BrjSE3cia6U1A5XNp0kHmUj8IMBaeiGaiNJV7b1csb0bq8EWYo2h1TuipR+7hmYjxeZsonGLNcmgsKp5EUDCEj9SvRyxX2uMUNfINmfNqglBYNNtjtNmdwWV2ly4uQKheyDyka2RTRoQ3IEfs+0BNcGJ4Z5AnmHNpFbCKW5PsXkAzJ6VVzzVMo0fwIUpQQT67itTNRE946/NxDashl9KuAFUbZ6yW91vObh+WAMZ1mQ1J4wotF6KXHuo65X6wSz406hW/T6XZMf/6W+HGYUxCDfhyjPaoMGcWccmbYM/H35NdHTOd79Jg0ho/BDBvRy2vcg8pHsv07UYiKrDFeqzL0Qk7qCkXLuukl2EKuR3xS6VtsLEaT0BfWoDYoQ1YvEjjT729XNMYoCX3j+2ApedBG/UHLOJ7AAnfPSqdmmePsY+522MpfPaf7kf6fIJMn0/4SE6PmuI3yjyeGjWn+1qj/ukf09DE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends layout | |
block content | |
main | |
section | |
- var post = locals.data.headlines[0] | |
#hero(style=bg) | |
a(href=post.perma) | |
h1= post.title | |
img(src= post.image) | |
.hero-overlay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "posthtml-pug", | |
"version": "1.0.0", | |
"description": "PostHTML Pug parser", | |
"main": "index.js", | |
"dependencies": { | |
"constantinople": "^3.1.0", | |
"isobject": "^2.1.0", | |
"object-assign": "^4.1.0", | |
"pug": "^2.0.0-beta5", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.all('*', function (req, res, next) { | |
res.header("Access-Control-Allow-Origin", req.headers.origin); | |
res.header("Access-Control-Allow-Credentials", true); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Content-Length"); | |
if (req.method == 'OPTIONS') { | |
return res.send(200); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* private modernizr mixin | |
* | |
* downside - only works on single-element selectors. nesting still works though. | |
* | |
* @param features - a list of modernizr test classes e.g.: csstransitions opacity OR csstransitions, opacity | |
* @param declaration - the {block} of content passed by the block mixins +yep()/+nope() | |
* @param support - boolean, true if testing support, false if testing no support | |
* | |
* 1. if testing for support, set selector to empty string | |
* if testing for no support, set selector to ".no-js" appended by |
- Make sure
node build
outputs some static files to_built
. npm run deploy
.
This eventually became this blog post and this module
This is a conceptual specification for what could/would/should be the preprocessor to end all preprocessors. Unfortunately, it is just that - a specification. I had made quite a few attempts to create a CSS preprocessor, but I am far too inexperienced with advanced programming to succeed at this task. I got as far as the scanner and half of a half-working tokenizer before proceeding to pull my hair out. So I gave up, and decided just to list the proposed features here for reference. Perhaps these will make their way into existing pre-processors, or even inspire the birth of a new one.
Pretty much everything the 3 leading pre-processors offer in terms of:
NewerOlder