node_modules/
.idea
.DS_Store
npm-debug.log
# Intro to SCSS
This repository supports the [egghead](https://egghead.io/) course on SCSS.
.col-1 {
width: 100%;
}
.col-2 {
width: 50%;
}
.col-3 {
width: 33.33333%;
}
.col-4 {
width: 25%;
}
.col-5 {
width: 20%;
}
.col-6 {
width: 16.66667%;
}
.col-7 {
width: 14.28571%;
}
.col-8 {
width: 12.5%;
}
.col-9 {
width: 11.11111%;
}
.col-10 {
width: 10%;
}
[class~="mt-0.5"] {
margin-top: 0.5rem;
}
[class~="mt-1"] {
margin-top: 1rem;
}
[class~="mt-1.5"] {
margin-top: 1.5rem;
}
[class~="mt-2"] {
margin-top: 2rem;
}
[class~="mt-2.5"] {
margin-top: 2.5rem;
}
[class~="mt-3"] {
margin-top: 3rem;
}
[class~="mt-3.5"] {
margin-top: 3.5rem;
}
[class~="mt-4"] {
margin-top: 4rem;
}
[class~="mt-4.5"] {
margin-top: 4.5rem;
}
[class~="mt-5"] {
margin-top: 5rem;
}
.passion1 {
color: #BA0000;
}
.empathy1 {
color: rebeccapurple;
}
.cool-kid1 {
color: blue;
}
.passion2 {
color: #d90000;
}
.empathy2 {
color: #753bb0;
}
.cool-kid2 {
color: #1f1fff;
}
.passion3 {
color: #e80000;
}
.empathy3 {
color: #7d3ebb;
}
.cool-kid3 {
color: #2e2eff;
}
.passion4 {
color: #f70000;
}
.empathy4 {
color: #8547c2;
}
.cool-kid4 {
color: #3d3dff;
}
.passion5 {
color: #ff0808;
}
.empathy5 {
color: #8c53c6;
}
.cool-kid5 {
color: #4d4dff;
}
.passion6 {
color: #ff1717;
}
.empathy6 {
color: #945ec9;
}
.cool-kid6 {
color: #5c5cff;
}
.passion7 {
color: #ff2626;
}
.empathy7 {
color: #9c6acd;
}
.cool-kid7 {
color: #6b6bff;
}
.passion8 {
color: #ff3535;
}
.empathy8 {
color: #a375d1;
}
.cool-kid8 {
color: #7a7aff;
}
.passion9 {
color: #ff4545;
}
.empathy9 {
color: #ab81d5;
}
.cool-kid9 {
color: #8a8aff;
}
.passion10 {
color: #ff5454;
}
.empathy10 {
color: #b38cd9;
}
.cool-kid10 {
color: #9999ff;
}
.cool {
color: rebeccapurple;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SassyEgghead</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="new">Where are my styles?</div>
</body>
</html>
{
"name": "Sassy-Egghead",
"version": "0.0.1",
"description": "Learn the Best and Most Useful SCSS Egghead Course Repo",
"devDependencies": {
"node-sass": "^3.11.2"
},
"scripts": {
"start": "node-sass -o css scss --output-style expanded"
},
"author": "Ari Picker",
"license": "UNLICENSED"
}
$base-color: #a83b24;
$light-color: lighten($base-color, 20%);
$dark-color: darken($base-color, 35%);
.old-light-dark {
background-image: linear-gradient($light-color, $base-color, $dark-color);
}
$light-color: scale_color($base-color, $alpha: -50%);
$dark-color: scale_color($base-color, $saturation: -35%);
$cbc: complement($base-color);
$clc: complement($light-color);
$cdc: complement($dark-color);
.wolverine {
text-align: center;
background-image: linear-gradient($light-color, $base-color, $dark-color);
&:hover {
background-image: linear-gradient($clc, $cbc, $cdc);
.wolverine-text {
color: transparentize(mix($base-color, yellow, 25%), .2);
}
}
&-text {
font-size: 1.5rem;
padding-bottom: 1rem;
color: mix($base-color, yellow, 75%);
}
img {
margin-top: 3rem;
border-radius: 50%;
}
}
%hero .stuff { background: linear-gradient(red, white, blue); }
%villain { background: darkred; }
@mixin character($type: hero) {
height: 20px;
width: 20px;
@extend %#{$type};
@content;
}
.doc-ock {
@include character(villain){
border: 1px solid green;
};
}
.cheetah { @include character(villain); }
.enchantress { @include character(villain); }
.captain-america { @include character; }
.medusa { @include character(hero); }
.she-hulk { @include character(hero); }
@mixin make-transitions($transitions...) {
transition: $transitions;
}
@media screen and (min-width: 800px) {
%buddy { color: purple; }
}
@media screen and (min-width: 800px) {
.buddy {
@extend %buddy;
}
}
@for $i from 1 through 10 {
.col-#{$i} {
width: 100% / $i;
}
}
/////////////////////////////////////
@for $i from 1 through 10 {
$value: 0.5 * $i;
[class~="mt-#{$value}"] {
margin-top: #{$value}rem;
}
}
/////////////////////////////////////
@mixin light-color-class($color, $color-name, $i) {
$color-value: if($i == 1, $color, lighten($color, 3% * $i));
.#{$color-name}#{$i} {
color: $color-value;
}
}
@for $i from 1 through 10 {
@include light-color-class(#BA0000, passion, $i);
@include light-color-class(rebeccapurple, empathy, $i);
@include light-color-class(blue, cool-kid, $i);
}
@import "iterate-with-@for/iterate-with-@for";
.character {
text-align: center;
width: 15rem;
display: inline-block;
margin: 0.5rem;
p {
font-size: 1.5rem;
padding-bottom: 0.5rem;
}
img {
margin-top: 1rem;
border-radius: 25%;
}
}
@mixin make-transitions($transitions...) { transition: $transitions; }
@mixin make-character($base-color: #a83b24, $mix-color: #fffaa6, $border: null) {
$light-color: lighten($base-color, 20%);
$dark-color: darken($base-color, 35%);
$cbc: complement($base-color);
$clc: complement($light-color);
$cdc: complement($dark-color);
background-image: linear-gradient($light-color, $base-color, $dark-color);
border: $border;
&:hover { background-image: linear-gradient($clc, $cbc, $cdc); }
&:hover &-text { color: transparentize(mix($base-color, $mix-color, 25%), .2); }
&-text {
color: mix($base-color, $mix-color, 75%);
}
img { @content; }
}
@mixin media($min-width) {
@media screen and (min-width: $min-width) { @content; }
}
.wolverine {
@include make-character($border: 5px solid brown, $mix-color: pink) {
@include make-transitions(margin 1s, border-radius 1s, border 1s, transform 1s);
&:hover {
margin-top: 5rem;
border-radius: 50%;
border: 10px solid green;
transform: rotate3d(10, 0, 0, 360deg);
}
};
}
.rogue { @include make-character(#0ab36d, #FFFE8A, 5px solid green); }
.firestar { @include make-character(#DB233B, #e3fd00); }
.nightcrawler {
@include make-character(#1d6098, #ffcef9) {
@include media(800px) { content: url("../images/bamf.jpg"); }
};
}
.spiderman {
padding: 1rem 2rem;
transition: transform .8s ease-in-out;
&-container:hover & { transform: rotate(180deg); }
&-container { background-color: #dbbebe; }
&::before {
display: block;
content: url('http://gallery1.anivide.com/_full/80728_1442526786.gif');
}
img {
transition: transform .8s ease-in-out;
&:hover { transform: rotate(360deg); }
}
.description {
color: darkred;
text-align: center;
margin-top: 1rem;
.header { font-size: 2rem; }
}
.description-link {
text-decoration: none;
&::after {
content: url('https://65.media.tumblr.com/avatar_a96a78c3d6ad_128.png');
display: inline-block;
vertical-align: middle;
}
}
}
.blue { color: $yellow; }
.blue { color: lighten(blue, 35%); }
$yellow: yellow;
.cool { color: rebeccapurple; }
$color-text-default: #424954;
$color-text-light: #EBEBEB;
$color-text-muted: #989898;
$color-primary: #8465D9;
$color-danger: #E83043;
$color-success: #3DC123;
$color-info: #CFFF32;
$color-warning: #FFB62F;
$font-family-primary: Roboto, 'Open Sans', Helvetica Neue, sans-serif;
$font-family-secondary: Georgia, Times New Roman, serif;
$font-family-monospace: Menlo, Monaco, Consolas, monospace;
$font-family: $font-family-primary;
$font-size-base: 14px;
$font-size-large: 18px;
$font-size-small: 12px;
$font-size-h1: 36px;
$font-size-h2: 30px;
$font-size-h3: 24px;
$font-size-h4: $font-size-large;
$font-size-h5: $font-size-base;
$font-size-h6: $font-size-small;
$captain-marvel: green;
$wom: women-of-the-marvel-universe;
.#{$wom} { content: "#{$wom}"; }
.#{$wom}-text { color: $color-text-muted; }
.#{$wom}-cape { background-color: $color-primary; }
img { border: 1px dotted $captain-marvel; }
.elektra {
$elektra: purple;
$captain-marvel: blue;
color: $captain-marvel;
border: 1px solid $elektra;
font-size: $font-size-h1;
}
.fancy { color: $captain-marvel; }