OOCSS - Object Oriented CSS
- Seperation of structure from skin
- Seperation of container & content
/* HTML */ | |
<div class="container"> | |
<div class="child"></div> | |
<div> | |
/* Basic Style */ | |
.container { | |
width: 500px; |
curl https://git.io/ -i -F "url=<repo-url>" -F "code=<repo-name>"
Above command will give you something like git.io/repo-name
// without 2nd argument support | |
if (typeof Object.create !== 'function') { | |
Object.create = function(o, props) { | |
function F() {} | |
F.prototype = o; | |
return new F(); | |
} | |
} | |
List of useful npx (NPM Package Runner) commands.
Using NPX we can execute/run node binaries without the need to install it locally or globally.
#!/usr/bin/env node | |
const { exec } = require('child_process'); | |
exec('code --list-extensions', (err, stdout) => { | |
if (err) console.log('Error occurred', err); | |
const extensions = stdout.split('\n').filter(extension => extension); | |
console.log(`\n✅ Installed VS Code Extensions: ${extensions.length} \n`); |
✅ Installed VS Code Extensions: 11
There are two main types of margin collapse:
Using a padding or border will prevent collapse only when Collapsing is between parent and children. Also, any value of overflow different from its default (visible) applied to the parent will prevent collapse.
Thus, both overflow: auto and overflow: hidden will have the same effect.