Chrome Extension

css code snippets

CSS Input Placeholder Customization
/* SUPPORTS - chrome, firefox, opera, safari */
::placeholder {
  color: blue;
  opacity: 1;
}

/* SUPPORTS - internet explorer 10+ */
:-ms-input-placeholder { 
  color: blue;
}

/* SUPPORTS - microsoft edge */
::-ms-input-placeholder { 
  color: blue;
}

/* FOR SPECIFIC INPUT HAVING CLASS - control  */
input.control::placeholder {
    color: blue;
    opacity: 1;
}
Remove (WebKit) Chrome browser autofill background color CSS
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active  {
    /* -webkit-box-shadow: 0 0 0 40px white inset !important; */
    -webkit-box-shadow: 0 0 0 0 rgba(white,0.0) inset !important;

}
input:-webkit-autofill {
    -webkit-text-fill-color: yellow;
}
test.test
padding:10px;
Create a simple Vertical menu using CSS Example 1
.v_menu {
    border: 1px solid #ddd;
    width: 250px;
    margin: 0;
    padding: 5px;
    border-radius: 10px;
}
.v_menu li {
    display: block;
}
.v_menu li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    border-radius: 10px;
    color: #000;
    font-size: 15px;
}
.v_menu li a.active {
    background: #000;
    color: #fff;
}
sample css code
.sample{
    display: inline-block;
    background-color: red;
}
sample css
.sample{
    display: inline-block;
    background-color: red;
}
Add border radius to element CSS
/*add radius all sides*/
.element {
    border-radius: 10px;
}
/* 
add radius specific sides 
order - top-left top-right bottom-right bottom-left
*/
.element {
    border-radius: 20px 10px 30px 20px;
}
Add image to background using CSS
/* using background proprty */
body {
    background: url('https://placeimg.com/640/480/arch'); /*this will add image to background */
}

/* using background */
body {
    background-image: url('https://placeimg.com/640/480/arch'); /*this will add image to background */
}
Change Last element style using CSS
ul li:last-child {
    background: #ff0000;
    border: 1px solid #ff0000;
}
Change font color CSS
.element {
    color: #ff0000;
}
Customize placeholder color in CSS
/* SUPPORTS - chrome, firefox, opera, safari */
::placeholder {
  color: blue;
  opacity: 1;
}

/* SUPPORTS - internet explorer 10+ */
:-ms-input-placeholder { 
  color: blue;
}

/* SUPPORTS - microsoft edge */
::-ms-input-placeholder { 
  color: blue;
}

/* FOR SPECIFIC INPUT HAVING CLASS - control  */
input.control::placeholder {
    color: blue;
    opacity: 1;
}
Capitalize, Uppercase, Lowercase, text-transform in CSS
/* TO CAPITALIZE A SENTENCE */
.capitalize {
    text-transform: capitalize;
}

/* TO UPPERCASE A SENTENCE */
.uppercase {
    text-transform: uppercase;
}

/* TO LOWERCASE A SENTENCE */
.lowercase {
    text-transform: lowercase;
}
Word spacing CSS
.paragraph {
    word-spacing: 10px;
}
qwe
asdf
Remove chrome browser autofill background color CSS
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active  {
    -webkit-box-shadow: 0 0 0 40px white inset !important;
}
flex direction in CSS
.flex_element {
    display: flex;
    flex-direction: row;
}

.flex_element {
    display: flex;
    flex-direction: row-reverse;
}

.flex_element {
    display: flex;
    flex-direction: column;
}

.flex_element {
    display: flex;
    flex-direction: column-reverse;
}

.flex_element {
    display: flex;
    flex-direction: initial;
}
Create skew background using CSS
.skew_container  {
   max-width: 500px;
   margin: 50px auto;
   overflow: hidden;
   padding-bottom: 4%;
}

.skew_container .skew_bg {
   height: 260px;
   background: #115edb;
   text-align: center;
   padding-top: 130px;
   margin-top: -9%;
   transform: skew(0deg, 10deg); /*THIS WILL DO THE MAGIC*/
}

.skew_container .skew_bg .content {
   color: #fff;
   font-size: 30px;
   transform: skew(0deg, -10deg); /* MAKE CONTENT HORIZENTAL */
}
Left side box shadow only in CSS
.element {
    -webkit-box-shadow: -5px 0 5px -5px #333;
    -moz-box-shadow: -5px 0 5px -5px #333;
    box-shadow: -5px 0 5px -5px #333;
}

/* FOR INSET CASE */
.elemnt_inset_left_shaow {
    -webkit-box-shadow: 7px 0 4px -4px #333 inset;
    -moz-box-shadow: 7px 0 4px -4px #333 inset;
    box-shadow: 7px 0 4px -4px #333 inset;
}
CSS3 Animations
.container {
  animation-name: popin;
  animation-duration: 5s;
  animation-timing-function: linear;
  animation-delay: 2s;
  animation-iteration-count: infinite;
  animation-direction: reverse;
}

/*THE ABOVE CODE IN SHORT FORMAT CAN BE WRITTEN IN SINGLE LINE*/
.container {
    animation: popin 5s linear 2s infinite reverse;
}

/* TO GENERATE ANIMATION WE USE KEYFRAMES */
@keyframes popin {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1.0);
    }
}
Rounded button
.rounded_button {
   padding: 1.2rem 2.5rem;
   font-size: 1rem;
   background: #207ef9;
   color: #fff;
   border-radius: 40px;
   border: 0;
   letter-spacing: 1px;
   cursor: pointer;
   outline: 0;
}

.rounded_button:hover {
   opacity: .9;
}
Text ellipsis for multi lines in CSS
.multi_line_ellipsis {
    display: -webkit-box;
    max-height: 3rem;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-line-clamp: 2;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.6rem;
}
Bottom box shadow only to element in CSS
.bottom-box-shadow {
    -webkit-box-shadow: 0 8px 6px -6px rgba(0,0,0,0.7);
       -moz-box-shadow: 0 8px 6px -6px rgba(0,0,0,0.7);
            box-shadow: 0 8px 6px -6px rgba(0,0,0,0.7);
}
Create rounded shape style button using CSS
.rounded_button {
   padding: 1.2rem 2.5rem;
   font-size: 1rem;
   background: #207ef9;
   color: #fff;
   border-radius: 40px;
   border: 0;
   letter-spacing: 1px;
   cursor: pointer;
   outline: 0;
}

.rounded_button:hover {
   opacity: .9;
}