Skip to content

Instantly share code, notes, and snippets.

View spemer's full-sized avatar
👨‍💻
Designer

Hyouk Seo spemer

👨‍💻
Designer
View GitHub Profile
$font-stack-code: Menlo, monospace, consolas;
$font-stack-article: 'Merriweather',serif;
$darkgrey: #656c7a;
$lightgrey: #e7e9ee;
.code-block {
font: 100% $font-stack-code;
color: $darkgrey;
background-color: $lightgrey;
}
// set default font-size
@function getRem($size) {
$rem: $size / 16px;
@return $rem * 1rem;
}
@mixin font-size($size) {
font-size: $size;
font-size: getRem($size);
div {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
}
const autoprefixer = require('gulp-autoprefixer');
gulp.task('prefix', () =>
gulp.src('styleTest.css')
.pipe(autoprefixer({
browsers: ['last 99 versions'],
cascade: false
}))
.pipe(gulp.dest('style'))
);
div {
display: flex;
}
var gulp = require('gulp');
gulp.task('taskname', function(){
console.log('\nHello world!\n');
});
@spemer
spemer / set-aria-hidden-i-tag.js
Last active February 12, 2018 04:44
Just copy and paste following code snippet will set attribute - 'aria-hidden' for every <i> tag if it has classname 'fa' in your HTML code.
//for fontawesome icons (<i> tags with .fa)
(function(){
let getIcons = document.querySelectorAll('i.fa');
getIcons.forEach(function(iconEach)
{
let getIconAttr = iconEach.getAttribute('aria-hidden');
if (!getIconAttr)
{
iconEach.setAttribute('aria-hidden','true');
}
img[alt=""],
img:not([alt]){
border: 4px dashed red;
}
.blob-wrapper::-webkit-scrollbar {background-color:#fff;height:4px}
.blob-wrapper::-webkit-scrollbar-track {background-color:#fff}
.blob-wrapper::-webkit-scrollbar-thumb {background-color:#babac0;border-radius:4px}
::-webkit-scrollbar {/* entire scrollbar scope */}
::-webkit-scrollbar-button {/* directional buttons at the top and bottom of the scrollbar */}
::-webkit-scrollbar-track {/* space below the scrollbar */}
::-webkit-scrollbar-track-piece {/* not covered area by the scrollbar-thumb */}
::-webkit-scrollbar-thumb {/* draggable scrollbar itself */}
::-webkit-resizer {/* resizser at the bottom of the scrollbar */}
::-webkit-scrollbar-corner {/* bottom of the scrollbar without resizse */}