Skip to content

Instantly share code, notes, and snippets.

View codedrops-io's full-sized avatar

CodeDrops codedrops-io

View GitHub Profile
@codedrops-io
codedrops-io / media-query-mixins.scss
Created June 18, 2020 15:01
Media query mixins.
// Device sizes
$phone: 599px;
$tablet-portrait: 600px;
$tablet-landscape: 900px;
$desktop: 1200px;
$desktop-big: 1800px;
// Media queries
@mixin for-phone-only {
@media (max-width: $phone) {
@codedrops-io
codedrops-io / copy-to-clipboard.js
Created June 18, 2020 20:19
Simple copy to clipboard function.
const copyTextToClipboard = (textString) => {
const textarea = document.createElement('textarea')
textarea.value = textString
document.body.appendChild(textarea)
textarea.select()
document.execCommand('copy')
document.body.removeChild(textarea)
}
@codedrops-io
codedrops-io / disable-zoom-on-mobile.html
Created June 19, 2020 08:07
Disable zoom on mobile with HTML.
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">