Skip to content

Instantly share code, notes, and snippets.

View alireza-saberi's full-sized avatar
🎯
Focusing

Alireza Saberi alireza-saberi

🎯
Focusing
  • Couple of big/medium/small un/known companies around the world
  • Michigan, USA
View GitHub Profile
@alireza-saberi
alireza-saberi / placeholderstyle.scss
Created November 17, 2017 20:02
styling of the input placeholder
::-webkit-input-placeholder { /* Chrome */
color: red;
}
:-ms-input-placeholder { /* IE 10+ */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
opacity: 1;
}
@alireza-saberi
alireza-saberi / iosinputbox.scss
Created November 17, 2017 18:33
input box style in ios
input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
@alireza-saberi
alireza-saberi / general.scss
Last active November 16, 2017 01:27
GENERAL CSS TIPS AND TRICKS
// z-index only works on positioned elements (absolute, relative or fixed) :)
// if you have statice element you have to change
// example
.navbar-header {
position: relative;
z-index:1;
}
// trick of shrinking a text to three dots
@alireza-saberi
alireza-saberi / new checkbox
Created October 23, 2017 19:07
replacing checkbox + radiobox
input[type="radio"] {
visibility: hidden;
position: relative;
}
input[type="radio"]:after{
visibility: visible;
position: absolute;
content: "";
@alireza-saberi
alireza-saberi / navbar_animated.scss
Created August 31, 2017 13:30
Animated navbar collapsed
.navbar-toggle {
border: none;
background: transparent !important;
&:hover {
background: transparent !important;
}
.icon-bar {
width: 22px;
@alireza-saberi
alireza-saberi / new_checkbox.css
Created August 19, 2017 13:52
Changing the check box
input[type="checkbox"] {
display:none;
}
input[type="checkbox"] + label span {
display:inline-block;
width:19px;
height:19px;
margin:-2px 10px 0 0;
vertical-align:middle;
background:url(check_radio_sheet.png) left top no-repeat;
@alireza-saberi
alireza-saberi / growing_underline.css
Created August 18, 2017 02:54
a line from left to right grow under a navbar
&:after {
display:block;
content: '';
border-bottom: solid 3px #ffcd00;
transform: scaleX(0);
transition: transform 250ms ease-in-out;
transform-origin:0 50%;
box-sizing: border-box;
}
@alireza-saberi
alireza-saberi / responsive_background_image.csss
Created August 8, 2017 15:58
this is css rules to have a responsive background image
background-image: url('') ;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-color: #999;
@alireza-saberi
alireza-saberi / big-mistake-facebook.js
Created May 16, 2017 19:06
facebook dirty STOP! message
var bigMistakeStyle = 'color: red; font-size: 60px font-weight: bold; font-family: helvetica, text-shadow: 1px 1px 2px black;'
console.log('%c STOP!', bigMistakeStyle);
@alireza-saberi
alireza-saberi / animation.html
Created April 5, 2017 15:29
making a simple animation with js
<!doctype html>
<html>
<head>
<style>
#container {
width: 200px;
height: 200px;
background: green;
position: relative;
}