Modern HTML/CSS/Sass. - Brad Traversy

 //OverLay. ( 1st Way )
  .parent {
       background: url("./folder1/img.jpg') no-repeat center center/cover;
  }
  .child { 
      background-color : rgba(0,0,0,0.5);
    //It will add Black ( required ) layer on the top of the parent-Background Image. 
    }       

------------------------------------------------------------------------

 //BackgroundImage, Adding Layer on the top of the Image. ( 2nd Way )
// Adding Image and providing Layer on that specific background only.
.selectContainer {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.377),
        rgba(0,0,0, 100)
      ),url(/r/featured.jpg) no-repeat center center/cover;
}
//Direct Child.
div > p {
  // Will look for child "p" in 'div', It won't select any nested elements 'p'.
}

//Direct After.
div + p {
  //WIll select all the 'div' and 'p' on the same level. ( Sibling )
}

//By Attribute.
input[target] { }
 //Or
input[type='text'] { }

//Nth Child.
ul li:nth-child( 3n+0 ) { }

ul li:nth-of-type(odd) {
  //Will Select All odd Number li's.
}

//Before And After,
ul li:before { content : 'add before the Li' }
ul li:after { content : 'Added at the End of the li' }

//Box Shadow.
div.box { 
  // offset-X | offset-y | blur-radius | spread-radius | color.
  box-shadow : 3px 3px 10px 1px grey;
 }

//Text-shadow.
div p.heading {
 // h-shadow | v-shadow | blur | color. 
  text-shadow : 0.4rem 0.3rem 0.7rem steelblue;
}

//Variable ( Customer Properties ).
:root { --variableNameHere : red }
p.heading { color : var(--variableNameHere) }
//or  
 div p { 
   --lightColor : grey;
    color : var(--lightColor);
   //Not Used, Not good Approach.
  }

//Keyframes.
.box { 
  animation-name : animateOne;
  animation-duration : 2s;
 }
 @keyframes animateOne { 
 from { }
  to {}
  //We can also use Percentages.
}
 

//Transition.
.box {  transition : background  2s ease-in-out; }
//Will make transition only on background ,Or
.box {  transition : all 2s ease-in-out; }
 // 'all' will make transition on everything( background/border... ).
.box:hover { 
  background : red;
  border-radius : 50%;
  height : 300px;
  width : 300px;
 }

//Transform.
   .box {
        background: white; width: 300px;height: 300px;
        /* Transform - rotate, scale, skew */
        /* transform: rotate(25deg); */
        /* transform: skew(25deg); */
        /* transform: scale(2); */
        transition: all 1s ease-in-out;
      }

      .box:hover {
        /* transform: rotate(180deg); */
        /* transform: skew(25deg); */
        /* transform: scale(2); */
        /* border-radius: 50%;
        background-color: blue; */
        /* transform: translateY(100px);
        transform: translateX(-100px); */
        /* x & y */
        transform: translate(100px, 100px);
        transform: translate3d(100px, 100px, 100px);
      }


//Direct Child.
div > p {
  // Will look for child "p" in 'div', It won't select any nested elements 'p'.
}

//Direct After.
div + p {
  //WIll select all the 'div' and 'p' on the same level. ( Sibling )
}

//By Attribute.
input[target] { }
 //Or
input[type='text'] { }

//Nth Child.
ul li:nth-child( 3n+0 ) { }

ul li:nth-of-type(odd) {
  //Will Select All odd Number li's.
}

//Before And After,
ul li:before { content : 'add before the Li' }
ul li:after { content : 'Added at the End of the li' }

//Box Shadow.
div.box { 
  // offset-X | offset-y | blur-radius | spread-radius | color.
  box-shadow : 3px 3px 10px 1px grey;
 }

//Text-shadow.
div p.heading {
 // h-shadow | v-shadow | blur | color. 
  text-shadow : 0.4rem 0.3rem 0.7rem steelblue;
}

//Variable ( Customer Properties ).
:root { --variableNameHere : red }
p.heading { color : var(--variableNameHere) }
//or  
 div p { 
   --lightColor : grey;
    color : var(--lightColor);
   //Not Used, Not good Approach.
  }

//Keyframes.
.box { 
  animation-name : animateOne;
  animation-duration : 2s;
 }
 @keyframes animateOne { 
 from { }
  to {}
  //We can also use Percentages.
}
 

//Transition.
.box {  transition : background  2s ease-in-out; }
//Will make transition only on background ,Or
.box {  transition : all 2s ease-in-out; }
 // 'all' will make transition on everything( background/border... ).
.box:hover { 
  background : red;
  border-radius : 50%;
  height : 300px;
  width : 300px;
 }

//Transform.
   .box {
        background: white; width: 300px;height: 300px;
        /* Transform - rotate, scale, skew */
        /* transform: rotate(25deg); */
        /* transform: skew(25deg); */
        /* transform: scale(2); */
        transition: all 1s ease-in-out;
      }

      .box:hover {
        /* transform: rotate(180deg); */
        /* transform: skew(25deg); */
        /* transform: scale(2); */
        /* border-radius: 50%;
        background-color: blue; */
        /* transform: translateY(100px);
        transform: translateX(-100px); */
        /* x & y */
        transform: translate(100px, 100px);
        transform: translate3d(100px, 100px, 100px);
      }


.parent {
  display : grid;
  
  //work with columns.
  grid-template-columns : 1fr 2fr 1fr;
  //content will be in ratios (1 : 2 : 1)
  //Or
  grid-template-columns : 200px auto 200px;
  //first and third will be 200px and middle will take whole place.
  //Or
  grid-template-columns : auto auto;
  //Or
  grid-template-columns : repeat(3,auto);
  grid-gap : 1rem;
  //Will create gap between Each items.

  //Work With Rows.
  grid-template-rows : 1fr 1fr;
  grid-auto-rows : 4fr;
  // Will triple the size by '4fr' after two (as only two are mentioned) Rows. 
}

/*
.parent {
 //Not used often. ( auto responsive but does not look good every time ).
  grid-template-columns: repeat(auto-fit, minmax(200px , 1fr))}
*/

.singleItem {
   //Spanning rows or columns. ( Lines should be counted ( horizontal or Vertical ).)
  //Here the Values are the postions of the current col/row.
     grid-column-start: 1;
     grid-column-end: 4;
     //or
     grid-column : 1 / span 3;   
  
     grid-row-start: 1;
     grid-row-end: 3;
     //or
     grid-row: 1 / span 2; 
}

//Grid , grid-template-areas.
.gridParent {
  padding : 8px;  
  display : grid;
  grid-template-areas:
    'header header header'
    'content box-1 sidebar'
    'footer footer footer';
    grid-gap: 1rem; 
}

.header  {  grid-area: header;}
.content {  grid-area: content;}
.sidebar {  grid-area: sidebar;}
.box-1   {  grid-area: box-1; }
.footer  {  grid-area: footer;}
//Ways for : Installation for compiling Sass.

 > npm init -y
// Install the package.json file on directory 

 > npm install node-sass
//Install 'node-sass' as dependencies.

//Edit Package.json File.
"scripts": {
 "sass": "node-sass -w scss/ -o dist/css/ --recursive"
  }

> npm run sass
// To Run Sass, ( Just once is needed ) . IF adding any Partials, Need to run the command again.
// <------> Varia bles and Partials.
// Partials are Similar like components,We can store 'variables'(_variables) here, Which Can be re-used in different css stylesheets.
$colorRed : red;
body {
    background : $colorRed;
}


//Nesting and Structuring
// '&' Will refer to the Parent element which is class '.section'
.section  {
    h3 {
        font-size: 1.6rem;    
        color : black;
    }
    p {      }
    &-A {
        background-color: rgba(48, 245, 196, 0.329);
        padding : 10px 20px;
    }
    &-B {
        background-color: rgba(91, 194, 60, 0.329);
        padding : 0 20px;
    }
    &-C {
        background-color: rgba(98, 137, 245, 0.774);
        padding : 10px 20px;
    }
}

a {
    text-decoration: none;
    color : blue;
    &:hover {
        color : red;
        cursor: pointer;
    }
    &:active {
     color : goldenrod;
    }
}

//Inheritance & Contrast.
%btn-shared {
    text-decoration: none;
    color : blue;
    display: block;
    text-align: center;
}

a {
    @extend %btn-shared;
    //All the styling from 'btn-shared' Will be applied.
    &:hover {
        color : red;
        cursor: pointer;
    }
  
}

//Functions , Mixins.
 //It's Good idead to have functions and variables on a separate Partials ( separate File, Import to current file )
@function set-text-color($color){
    @if(lightness($color) > 50){
        @return #000;
    }@else {
        @return #fff;
    }
}
header {
 background-color: black;
 color : set-text-color(red);
 font-size: 2.0rem;
 line-height: 1.5;
}
    //Mixin
@mixin transformScss($propertyName){
    transform: $propertyName;
}

h1 {
    @include transformScss(rotate(20deg));
}
//Ways for : Installation for compiling Sass.

 > npm init -y
// Install the package.json file on directory 

 > npm install node-sass
//Install 'node-sass' as dependencies.

//Edit Package.json File.
"scripts": {
 "sass": "node-sass -w scss/ -o dist/css/ --recursive"
  }

> npm run sass
// To Run Sass, ( Just once is needed ) . IF adding any Partials, Need to run the command again.
// <------> Varia bles and Partials.
// Partials are Similar like components,We can store 'variables'(_variables) here, Which Can be re-used in different css stylesheets.
$colorRed : red;
body {
    background : $colorRed;
}


//Nesting and Structuring
// '&' Will refer to the Parent element which is class '.section'
.section  {
    h3 {
        font-size: 1.6rem;    
        color : black;
    }
    p {      }
    &-A {
        background-color: rgba(48, 245, 196, 0.329);
        padding : 10px 20px;
    }
    &-B {
        background-color: rgba(91, 194, 60, 0.329);
        padding : 0 20px;
    }
    &-C {
        background-color: rgba(98, 137, 245, 0.774);
        padding : 10px 20px;
    }
}

a {
    text-decoration: none;
    color : blue;
    &:hover {
        color : red;
        cursor: pointer;
    }
    &:active {
     color : goldenrod;
    }
}

//Inheritance & Contrast.
%btn-shared {
    text-decoration: none;
    color : blue;
    display: block;
    text-align: center;
}

a {
    @extend %btn-shared;
    //All the styling from 'btn-shared' Will be applied.
    &:hover {
        color : red;
        cursor: pointer;
    }
  
}

//Functions , Mixins.
 //It's Good idead to have functions and variables on a separate Partials ( separate File, Import to current file )
@function set-text-color($color){
    @if(lightness($color) > 50){
        @return #000;
    }@else {
        @return #fff;
    }
}
header {
 background-color: black;
 color : set-text-color(red);
 font-size: 2.0rem;
 line-height: 1.5;
}
    //Mixin
@mixin transformScss($propertyName){
    transform: $propertyName;
}

h1 {
    @include transformScss(rotate(20deg));
}
//Ways for : Installation for compiling Sass.

 > npm init -y
// Install the package.json file on directory 

 > npm install node-sass
//Install 'node-sass' as dependencies.

//Edit Package.json File.
"scripts": {
 "sass": "node-sass -w scss/ -o dist/css/ --recursive"
  }

> npm run sass
// To Run Sass, ( Just once is needed ) . IF adding any Partials, Need to run the command again.
// <------> Varia bles and Partials.
// Partials are Similar like components,We can store 'variables'(_variables) here, Which Can be re-used in different css stylesheets.
$colorRed : red;
body {
    background : $colorRed;
}


//Nesting and Structuring
// '&' Will refer to the Parent element which is class '.section'
.section  {
    h3 {
        font-size: 1.6rem;    
        color : black;
    }
    p {      }
    &-A {
        background-color: rgba(48, 245, 196, 0.329);
        padding : 10px 20px;
    }
    &-B {
        background-color: rgba(91, 194, 60, 0.329);
        padding : 0 20px;
    }
    &-C {
        background-color: rgba(98, 137, 245, 0.774);
        padding : 10px 20px;
    }
}

a {
    text-decoration: none;
    color : blue;
    &:hover {
        color : red;
        cursor: pointer;
    }
    &:active {
     color : goldenrod;
    }
}

//Inheritance & Contrast.
%btn-shared {
    text-decoration: none;
    color : blue;
    display: block;
    text-align: center;
}

a {
    @extend %btn-shared;
    //All the styling from 'btn-shared' Will be applied.
    &:hover {
        color : red;
        cursor: pointer;
    }
  
}

//Functions , Mixins.
 //It's Good idead to have functions and variables on a separate Partials ( separate File, Import to current file )
@function set-text-color($color){
    @if(lightness($color) > 50){
        @return #000;
    }@else {
        @return #fff;
    }
}
header {
 background-color: black;
 color : set-text-color(red);
 font-size: 2.0rem;
 line-height: 1.5;
}
    //Mixin
@mixin transformScss($propertyName){
    transform: $propertyName;
}

h1 {
    @include transformScss(rotate(20deg));
}
//Ways for : Installation for compiling Sass.

 > npm init -y
// Install the package.json file on directory 

 > npm install node-sass
//Install 'node-sass' as dependencies.

//Edit Package.json File.
"scripts": {
 "sass": "node-sass -w scss/ -o dist/css/ --recursive"
  }

> npm run sass
// To Run Sass, ( Just once is needed ) . IF adding any Partials, Need to run the command again.
// <------> Varia bles and Partials.
// Partials are Similar like components,We can store 'variables'(_variables) here, Which Can be re-used in different css stylesheets.
$colorRed : red;
body {
    background : $colorRed;
}


//Nesting and Structuring
// '&' Will refer to the Parent element which is class '.section'
.section  {
    h3 {
        font-size: 1.6rem;    
        color : black;
    }
    p {      }
    &-A {
        background-color: rgba(48, 245, 196, 0.329);
        padding : 10px 20px;
    }
    &-B {
        background-color: rgba(91, 194, 60, 0.329);
        padding : 0 20px;
    }
    &-C {
        background-color: rgba(98, 137, 245, 0.774);
        padding : 10px 20px;
    }
}

a {
    text-decoration: none;
    color : blue;
    &:hover {
        color : red;
        cursor: pointer;
    }
    &:active {
     color : goldenrod;
    }
}

//Inheritance & Contrast.
%btn-shared {
    text-decoration: none;
    color : blue;
    display: block;
    text-align: center;
}

a {
    @extend %btn-shared;
    //All the styling from 'btn-shared' Will be applied.
    &:hover {
        color : red;
        cursor: pointer;
    }
  
}

//Functions , Mixins.
 //It's Good idead to have functions and variables on a separate Partials ( separate File, Import to current file )
@function set-text-color($color){
    @if(lightness($color) > 50){
        @return #000;
    }@else {
        @return #fff;
    }
}
header {
 background-color: black;
 color : set-text-color(red);
 font-size: 2.0rem;
 line-height: 1.5;
}
    //Mixin
@mixin transformScss($propertyName){
    transform: $propertyName;
}

h1 {
    @include transformScss(rotate(20deg));
}

Similiar Collections

Python strftime reference pandas.Period.strftime python - Formatting Quarter time in pandas columns - Stack Overflow python - Pandas: Change day - Stack Overflow python - Check if multiple columns exist in a df - Stack Overflow Pandas DataFrame apply() - sending arguments examples python - How to filter a dataframe of dates by a particular month/day? - Stack Overflow python - replace a value in the entire pandas data frame - Stack Overflow python - Replacing blank values (white space) with NaN in pandas - Stack Overflow python - get list from pandas dataframe column - Stack Overflow python - How to drop rows of Pandas DataFrame whose value in a certain column is NaN - Stack Overflow python - How to drop rows of Pandas DataFrame whose value in a certain column is NaN - Stack Overflow python - How to lowercase a pandas dataframe string column if it has missing values? - Stack Overflow How to Convert Integers to Strings in Pandas DataFrame - Data to Fish How to Convert Integers to Strings in Pandas DataFrame - Data to Fish create a dictionary of two pandas Dataframe columns? - Stack Overflow python - ValueError: No axis named node2 for object type <class 'pandas.core.frame.DataFrame'> - Stack Overflow Python Pandas iterate over rows and access column names - Stack Overflow python - Creating dataframe from a dictionary where entries have different lengths - Stack Overflow python - Deleting DataFrame row in Pandas based on column value - Stack Overflow python - How to check if a column exists in Pandas - Stack Overflow python - Import pandas dataframe column as string not int - Stack Overflow python - What is the most efficient way to create a dictionary of two pandas Dataframe columns? - Stack Overflow Python Loop through Excel sheets, place into one df - Stack Overflow python - How do I get the row count of a Pandas DataFrame? - Stack Overflow python - How to save a new sheet in an existing excel file, using Pandas? - Stack Overflow Python Loop through Excel sheets, place into one df - Stack Overflow How do I select a subset of a DataFrame? — pandas 1.2.4 documentation python - Delete column from pandas DataFrame - Stack Overflow python - Convert list of dictionaries to a pandas DataFrame - Stack Overflow How to Add or Insert Row to Pandas DataFrame? - Python Examples python - Check if a value exists in pandas dataframe index - Stack Overflow python - Set value for particular cell in pandas DataFrame using index - Stack Overflow python - Pandas Dataframe How to cut off float decimal points without rounding? - Stack Overflow python - Pandas: Change day - Stack Overflow python - Clean way to convert quarterly periods to datetime in pandas - Stack Overflow Pandas - Number of Months Between Two Dates - Stack Overflow python - MonthEnd object result in <11 * MonthEnds> instead of number - Stack Overflow python - Extracting the first day of month of a datetime type column in pandas - Stack Overflow