Code Snippets Less

Short texts Less 🧑‍💻 Code snippets Less ✍️ Reading lists Less 👀

Atom Settings Backup by https://atom.io/packages/sync-settings

aaa # Your init script # # Atom will evaluate this file each time a new window is opened. It is run # after packages are loaded/activated and after the previous editor state # has been restored. # # An example hack to log to the console when each text editor is saved. # # […]

Matrix Effect

canvas(id=’canv’, width=500, height=200) Matrix Effect ————- A [Pen](https://codepen.io/gnsp/pen/vYBQZJm) by [Ganesh Prasad](https://codepen.io/gnsp) on [CodePen](https://codepen.io). [License](https://codepen.io/gnsp/pen/vYBQZJm/license). const canvas = document.getElementById(‘canv’); const ctx = canvas.getContext(‘2d’); const w = canvas.width = document.body.offsetWidth; const h = canvas.height = document.body.offsetHeight; const cols = Math.floor(w / 20) + 1; const ypos = Array(cols).fill(0); ctx.fillStyle = ‘#000’; ctx.fillRect(0, 0, w, h); function matrix […]

css skew one side

css skew one side —————– A [Pen](https://codepen.io/Jamwal/pen/jvbXyx) by [Ravinder](https://codepen.io/Jamwal) on [CodePen](https://codepen.io). [License](https://codepen.io/Jamwal/pen/jvbXyx/license). Baustellenbedarf a { color: white; } .title { position: relative; width: 120px; padding: 10px 20px 10px 10px; font-size: 20px; position: relative; color: #FFF; background: #FF0000; } .title:after { content: ” “; position: absolute; display: block; width: 100%; height: 100%; top: 0; left: 0; […]

magento2-style-template.less

// // // _____________________________________________ // // Common // _____________________________________________ & when (@media-common = true) { // } // // Mobile // _____________________________________________ .media-width(@extremum, @break) when (@extremum = ‘max’) and (@break = @screen__m) { // } // // Desktop // _____________________________________________ .media-width(@extremum, @break) when (@extremum = ‘min’) and (@break = @screen__m) { // }

Saving a file with pure JS

Saving a file with pure JS! Uses HTML5 W3C saveAs() function and the FileSaver.js polyfill for this. I didn’t think this was even possible without a server but the docs say it should work in IE 10+, Sweet! File name Text Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vitae iure ab voluptate sunt reiciendis, […]