This file contains hidden or 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
| .icon { | |
| background-image: url('[SVG LINK].svg#fragment-id'); | |
| } | |
This file contains hidden or 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
| var Wrapper = { | |
| create: function() { | |
| return Object.create( Wrapper ); | |
| }, | |
| stuff: function() { | |
| console.log( 'stuff' ); | |
| } | |
| }; |
This file contains hidden or 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
| // For WebKit | |
| ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { | |
| -webkit-appearance: none; | |
| } | |
| // For Mozilla | |
| input[type="number"] { | |
| -moz-appearance: textfield; | |
| } |
This file contains hidden or 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 React from 'react'; | |
| class Thing extends React.Component { | |
| constructor( props ) { | |
| super( props ); | |
| this.handleClick = this.handleClick.bind( this ); | |
| } | |
| handleClick() { |
This file contains hidden or 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
| const puncher = ( state ) => ({ | |
| punch: () => console.log( `My name is ${ state.name } and I can punch.` ); | |
| }); | |
| const kicker = ( state ) => ({ | |
| kick: () => console.log( `My name is ${ state.name } and I can kick.` ); | |
| }); | |
| const fighter = ( name ) => { | |
| let state = { |
This file contains hidden or 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
| // https://gist.github.com/ericelliott/f3c2a53a1d4100539f71 | |
| // Eric Elliott | |
| function foo({ | |
| param = 'stuff', | |
| another = 'things' | |
| } = {}) { | |
| return `${param} and ${things}`; | |
| } |
This file contains hidden or 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
Show hidden characters
| { | |
| "presets": [ "es2015", "react" ], | |
| "plugins": [ "transform-decorators-legacy" ] | |
| } |
This file contains hidden or 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
| /* Based on http://cssarrowplease.com, I just forget the URL all the time */ | |
| .tooltip { | |
| position: relative; | |
| background: #fff; | |
| border: 1px solid #ddd; | |
| } | |
| .tooltip::before, .tooltip::after { | |
| content: ''; | |
| bottom: 100%; |
This file contains hidden or 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
| /* https://github.com/suitcss/components-flex-embed/blob/master/lib/flex-embed.css */ | |
| .flex-embed { | |
| display: block; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .flex-embed-inner { | |
| display: block; |
This file contains hidden or 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
| $.fn.allowNumeric = function() { | |
| return this.on( 'keyup', function() { | |
| this.value = this.value.replace( /[^0-9\.]/g, '' ); | |
| }); | |
| }; |
NewerOlder