- Prefer composition over mixins
- Prefer immutablity
- Avoid using events as they create side-effects
- Lifecycle methods should always be a single function. e.g.
button.beforeMount(cxt)
- Declarative API with everything declared the same way in the same place
- Avoid the need for deku-specific plugins, it should make composition easy
- Avoid magic and complex APIs. Functions should just be functions with no side-effects.
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
/* ---------------------------------------------------------------------------------------------------- | |
Super Form Reset | |
A couple of things to watch out for: | |
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
- You NEED to set the font-size and family on all form elements | |
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
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
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
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
{ | |
"feature1": ["foo2@foo.com"] | |
} |
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
[ | |
{ | |
"id": "38016cdf-03fe-4a3b-a9df-8411bf43876c", | |
"firstName": "Orren", | |
"lastName": "Priest", | |
"email": "opriest0@aboutads.info", | |
"photo": "https://robohash.org/repudiandaeaeligendi.png?size=50x50&set=set1", | |
"department": "Support" | |
}, | |
{ |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
#form-search input | |
{ | |
-webkit-appearance:none; | |
border:1px solid #cfcfcf; | |
border-right:0; | |
height:23px; | |
width:200px; | |
font:inherit; | |
float:left; | |
padding:0 3px; |
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
import useQuery from './useQuery' | |
import gql from 'graphql-tag' | |
type Props = { | |
projectId: string | |
} | |
export default function Project(props: Props) { | |
const { data, loading } = useQuery({ | |
query: gql` |
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
@mixin border-radius($radius, $prefixes: -moz -webkit -o) { | |
@each $prefix in $prefixes { | |
#{$prefix}-border-radius:$radius; | |
} | |
border-radius:$radius; | |
} | |
#id { | |
@include border-radius(5px, -moz -webkit); |
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
/** | |
* Stream of dots from the integrations browser | |
*/ | |
var dots = new IntegrationStream({ | |
el: document.querySelector('.js-integration-stream') | |
}); | |
/** | |
* Create a stream | |
* |
NewerOlder