Skip to content

Instantly share code, notes, and snippets.

@aminsmartsense
aminsmartsense / button.scss
Created July 27, 2018 05:09
Using map-get function button component each loop in scss
// COLORS
$primary-color: #4285f4;
$secondary-color: #b579d2;
$tertiary-color: #2bbbad;
$green-color: rgb(29, 169, 85);
$orange-color: rgb(255, 136, 0);
$red-color: rgb(255, 53, 71);
$white-color: rgb(255, 255, 255);
@aminsmartsense
aminsmartsense / vertical-alignment.css
Created July 12, 2018 09:34
Vertical alignment property for loop using SCSS
.vertical-top {
vertical-align: top !important;
}
.vertical-middle {
vertical-align: middle !important;
}
.vertical-bottom {
vertical-align: bottom !important;
@aminsmartsense
aminsmartsense / responsive.scss
Created July 7, 2018 10:22
Responsive screen break point SCSS
@mixin respond($breakpoint) {
@if $breakpoint == phone {
@media(max-width: 600px) {
@content
}
}
@if $breakpoint == tab-port {
@media(max-width: 900px) {
@content
@aminsmartsense
aminsmartsense / placeholder.css
Created July 7, 2018 10:17
All browsers supported placeholder color mixin in SCSS.
/*Red color placeholder in all browser*/
.form-control.first-type input::-webkit-input-placeholder, .form-control.first-type textarea::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
color: red !important;
}
.form-control.first-type input::-moz-placeholder, .form-control.first-type textarea::-moz-placeholder {
/* Firefox 19+ */
color: red !important;
}
.form-control.first-type input:-ms-input-placeholder, .form-control.first-type textarea:-ms-input-placeholder {
@aminsmartsense
aminsmartsense / background.css
Last active April 21, 2021 20:29
Background image on nth-child using for loop in scss
div:nth-child(1) a:after {
background: url("assets/admin/images/pdf-icon.png") no-repeat;
}
div:nth-child(2) a:after {
background: url("assets/admin/images/csv-icon.png") no-repeat;
}
div:nth-child(3) a:after {
background: url("assets/admin/images/excel-icon.png") no-repeat;
}
@aminsmartsense
aminsmartsense / background-colors.css
Created July 4, 2018 06:56
Background colors class name dynamic with passing colors name in SCSS.
.red-bg-color {
background: red !important;
}
.green-bg-color {
background: green !important;
}
.blue-bg-color {
background: blue !important;
@aminsmartsense
aminsmartsense / colors.css
Last active July 4, 2018 06:54
Colors class name dynamic in SCSS with passing colors name.
.red-color {
color: red !important;
}
.green-color {
color: green !important;
}
.blue-color {
color: blue !important;
@aminsmartsense
aminsmartsense / alignment.css
Created July 4, 2018 06:43
All text alignments in SCSS with dynamic class generates.
.text-left {
text-align: left !important;
}
.text-right {
text-align: right !important;
}
.text-center {
text-align: center !important;
@aminsmartsense
aminsmartsense / spacing.css
Last active July 4, 2018 06:47
Margin and Padding classes using for loop in SCSS with dynamic class generates.
.MT-0 {
margin-top: 0px !important;
}
.PT-0 {
padding-top: 0px !important;
}
.ML-0 {
margin-left: 0px !important;
@aminsmartsense
aminsmartsense / index.css
Created July 4, 2018 06:09
For loop and each loop in SCSS with nth child of element.
.parent div:nth-child(1) {
color: red;
}
.parent div:nth-child(2) {
color: green;
}
.parent div:nth-child(3) {
color: blue;