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
<!-- Simplest solution is to just label the element as a element within an element --> | |
<div class="block"> | |
Content | |
<div class="block__element"> | |
Content | |
<div class="block__element__element"> | |
Content related to `block__element` | |
</div> | |
</div> | |
</div> |
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
# Atom Beautify - Debugging information | |
The following debugging information was generated by `Atom Beautify` on `Wed Mar 29 2017 17:33:12 GMT+0300 (Jerusalem Daylight Time)`. | |
--- | |
## Table Of Contents | |
- [Versions](#versions) | |
- [Original file to be beautified](#original-file-to-be-beautified) | |
- [Original File Contents](#original-file-contents) |
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
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
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
// Apply in your `main.js` or whatever suits you. ;) | |
const environment = { | |
install(Vue) { | |
Vue.prototype.$isdev = process.env.NODE_ENV === 'development' | |
Vue.prototype.$isprod = process.env.NODE_ENV === 'production' | |
Vue.prototype.$istest = process.env.NODE_ENV === 'testing' | |
} | |
} | |
Vue.use(environment) |
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 * as components from '@@' | |
Object.keys(components).forEach((key) => { | |
Vue.component(key, components[key]) | |
}) |
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
// ./components/EventBus.vue | |
import Vue from 'vue' | |
export const EventBus = new Vue() | |
// ./plugins/EventBus.js | |
export default { | |
install(Vue) { | |
const { EventBus } = require('../components/EventBus') | |
Vue.prototype.$bus = EventBus | |
} |
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
// https://www.paulirish.com/2012/box-sizing-border-box-ftw/ | |
html { | |
box-sizing: border-box; | |
} | |
*, *::before, *::after { | |
box-sizing: inherit; | |
} |
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
function generateClassName (amountOfLettersInClassName) { | |
amountOfLettersInClassName = amountOfLettersInClassName || 9; | |
var className = []; | |
for (var i = 0; i < amountOfLettersInClassName; i++) { | |
var charCodeOffset = 65; | |
var numeral = Math.round(Math.random() * 25) + charCodeOffset; | |
var letter = String.fromCharCode(numeral); | |
className.push(letter); | |
} |
OlderNewer