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
async function getComponents(fileKey, token) { | |
// Get file | |
const file = await fetch(`https://api.figma.com/v1/files/${fileKey}`, { | |
headers: { "X-Figma-Token": token } | |
}).then((r) => r.json()) | |
if (file.err === undefined) { | |
// Get style ids | |
const styleIds = Object.keys(file.styles) |
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 { createContext } from 'react'; | |
import { ServerStyleSheet } from 'styled-components'; | |
export default createContext<{ | |
styles: React.ReactNode[]; | |
renderMode: 'head' | 'body' | 'all'; | |
}>({ styles: [], renderMode: 'all' }); |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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
// | |
// <button> reset | |
// | |
// 1. Remove default browser appearance for buttons. | |
// 2. Remove margins. | |
// 3. Remove borders for IE. | |
// 4. Normalize font and color not inherited by `button`. | |
// 5. Address `overflow` in IE | |
// 6. Normalize cursor style |
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
Know how https://harvesthq.github.io/chosen/ falls back to a normal <select> in unsupported browsers? The following is a workaround for still allowing use of the `data-placeholder` property when initiated, but a sane fallback when not. | |
HTML output: | |
<div class="ChosenSelect"> | |
<select required data-placeholder="Choose a fruit"> | |
<option value="">Choose a fruit</option> | |
<option value="Apples">Apples</option> | |
<option value="Mangos">Mangos</option> | |
<option value="Pears">Pears</option> |
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
\curl -L https://get.rvm.io | bash -s stable | |
source /usr/local/rvm/scripts/rvm | |
rvm requirements | |
rvm install ruby | |
rvm use ruby --default | |
rvm rubygems current |
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
function basey_scripts_header() { | |
wp_enqueue_script('modernizr', get_template_directory_uri() . '/js/modernizr.foundation.js', '', null, false); | |
} | |
add_action('template_redirect','basey_scripts_header', 8); |
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
// You custom settings file to override Foundation defaults | |
@import "settings"; | |
// Comment out this import if you are customizing you imports below | |
// @import "foundation"; | |
// ---------------------------------------- | |
// Import specific parts of Foundation by commenting the import "foundation" | |
// and uncommenting what you want below. You must uncomment the following if customizing |