Egghead Instructor Ari Picker

Ari Picker

UI Guy, Dad, Ukulele Enthusiast



Unlock all of Ari's PRO Lessons
click for instant access!

Browse Ari Picker's lessons.

showing 21 lessons...

Write Custom Functions with the SCSS @function Directive

P

Write similar classes with the SCSS @for Control Directive

P

Organize SCSS into Multiple Files with Partials

P

Reuse Styles with the SCSS @extend Directive

P

Use Standard Built-in SCSS Functions for Common Operations:

P

Reuse Styles with the SCSS @mixin Directive

P

Organize Styles with SCSS Nesting and the Parent Selector

P

Use SCSS Variables for Readable and Maintainable Stylesheets

P

Transpile SCSS to CSS using node-sass

P

Loop Over Data with the SCSS @each Control Directive

P

Practical Generics in TypeScript

P

The Basics of Generics in TypeScript

P

Sharing Class Behavior with Inheritance in TypeScript

P

Using Interfaces to Describe Types in TypeScript

P

Union Types and Type Aliases in TypeScript

P

Using Assertion to Convert Types in TypeScript

P

Distinguishing between types of Strings in TypeScript

P

Using Type Inference in TypeScript

Creating a Class in TypeScript

P

Introduction to Static Typing

Typescript Enums vs Booleans when Handling State

P
css tutorial about Write Custom Functions with the SCSS @function Directive

Write Custom Functions with the SCSS @function Directive

5:14 css PRO

Writing SCSS @functions is similar to writing functions in other programming languages; they can accept arguments and have return statements. SCSS provides a ton of great features, but sometimes we need to roll our own function. We can do that too! They’re useful when the desired functionality isn’t available from the built in SCSS functions and a mixin just won’t do. In this lesson, we learn how and when to use SCSS function directives.

css tutorial about Write similar classes with the SCSS @for Control Directive

Write similar classes with the SCSS @for Control Directive

5:10 css PRO

Writing similar classes with minor variations, like utility classes, can be a pain to write and update. Sometimes just a single character is the only difference between classes and updating the defining parameter means we need to change it for every class name and value. We can write a class one time and the @for directive can write all the minor variations for us. If the similar classes need to be updated, with the help of the @for directive, they only need to be updated once. In this lesson we learn how to leverage the power of the SCSS @for control directive to relieve the pain.

css tutorial about Organize SCSS into Multiple Files with Partials

Organize SCSS into Multiple Files with Partials

3:22 css PRO

Tired of dealing with monolithic CSS files? Are requests for multiple CSS files hurting your performance? In this lesson we learn how to separate our styles with SCSS partials, and how SCSS imports compile to one file so there's only one request.

css tutorial about Reuse Styles with the SCSS @extend Directive

Reuse Styles with the SCSS @extend Directive

5:48 css PRO

We can write reusable styles with the SCSS @extend or @mixin directives. Which one is better? It depends. A better question is, how do they differ?
Extends:
change the source order, mixins don’t.
maintain relationships, mixins don’t.
share inherited traits, mixins don’t.
can extend multiple classes, mixins don’t.
can create multiple class declarations in the compiled CSS, mixins don’t.
can use the placeholder selector, mixins don’t.

Mixins:
can accept arguments, extends don’t.
can pass additional content, extends don’t.
repeat code when compiled, extends group class names together.
work well wIth media queries, extends have a limited interaction wIth media queries.

In this lesson we learn about writing reusable styles with the @extend directive and how it compares to the @mixin directive.

css tutorial about Use Standard Built-in SCSS Functions for Common Operations:

Use Standard Built-in SCSS Functions for Common Operations:

3:51 css PRO

We can use javascript for color and opacity variations, math, list and map logic or to see if something exists. SCSS includes functions for a wide range of common use cases for logic in our styles. In this lesson we look at some of the more useful color functions to improve development velocity, readability, and simplify the code. Be sure to checkout all the SCSS functions: http://sass-lang.com/documentation/Sass/Script/Functions.html

css tutorial about Reuse Styles with the SCSS @mixin Directive

Reuse Styles with the SCSS @mixin Directive

5:24 css PRO

Copy/pasting the same code is redundant and updating copy/pasted code slows development velocity. Mixins are reusable chunks of code that are included, similar to calling a function, instead of copy/pasted.

Mixins have some nice features:
- Arguments just like functions.
- Arguments can have default values and optional values.
- Named arguments allow us to use optional and default arguments when the mixin is included.
- Variable arguments allow us to have a dynamic number of arguments when the mixin is included.
- The @content directive allow us to add additional styles when the mixin is included.

In this lesson we learn how to DRY up the code with the SCSS @mixin directive and make copy/paste a thing of the past.

css tutorial about Organize Styles with SCSS Nesting and the Parent Selector

Organize Styles with SCSS Nesting and the Parent Selector

3:06 css PRO

SCSS nesting can produce DRYer code by targeting child elements without having to write the parent class. Nesting up to 3 levels deep can help us understand relationships between styles. The SCSS parent selector represents the parent class, so it can DRY up targeting pseudo-elements/classes and be an asset for naming conventions. In this lesson we learn how to remove the redundancy of targeting pseudo-elements/classes, and child elements by taking advantage of SCSS’s nesting and parent selectors.

css tutorial about Use SCSS Variables for Readable and Maintainable Stylesheets

Use SCSS Variables for Readable and Maintainable Stylesheets

2:00 css PRO

Updating the same color or metric multiple times is no fun. SCSS variables improve maintainability by allowing one name to represent a value that can be used anywhere. SCSS variables also give us the power of creating our own naming conventions to express the intent of specific values. In this lesson we learn how to use SCSS variables to assign user friendly names to colors/metrics so one value change will update that value in all the right places.

css tutorial about Transpile SCSS to CSS using node-sass

Transpile SCSS to CSS using node-sass

0:45 css PRO

In this lesson we learn how to set up SCSS and transpile your SCSS code into CSS with node-sass.

css tutorial about Loop Over Data with the SCSS @each Control Directive

Loop Over Data with the SCSS @each Control Directive

5:06 css PRO

The SCSS @for directive is great when we know how many iterations are required and we only need 1 variable. What if we need multiple variables to iterate over data sets? Hello SCSS maps and the @each control directive! In this lesson, we’ll check out iterating with lists and looping over data sets with maps and the @each directive.

typescript tutorial about Practical Generics in TypeScript

Practical Generics in TypeScript

2:52 typescript PRO

Typescript generics are great for writing code that accepts any type. How do we write code that doesn’t accept any type, but instead accepts a range of types? In this lesson we learn how to use generic classes, interfaces and constraints to be more specific with our Typescript generics.

typescript tutorial about The Basics of Generics in TypeScript

The Basics of Generics in TypeScript

2:07 typescript PRO

It can be painful to write the same function repeatedly with different types. Typescript generics allow us to write 1 function and maintain whatever type(s) our function is given. This lesson covers syntax and a basic use case for Typescript generics.

typescript tutorial about Sharing Class Behavior with Inheritance in TypeScript

Sharing Class Behavior with Inheritance in TypeScript

3:42 typescript PRO

Typescript classes make inheritance much easier to write and understand. In this lesson we look into how to set up inheritance with Typescript classes, extends and super.

typescript tutorial about Using Interfaces to Describe Types in TypeScript

Using Interfaces to Describe Types in TypeScript

3:32 typescript PRO

It’s easy to pass the wrong value to a function. Typescript interfaces are great because they catch errors at compile time or in an IDE. In this lesson we’ll learn how to describe a type shape with Typescript interfaces.

typescript tutorial about Union Types and Type Aliases in TypeScript

Union Types and Type Aliases in TypeScript

5:01 typescript PRO

Sometimes we want our function arguments to be able to accept more than 1 type; e.g. a string or an array. This lesson will show us how to assign more than 1 type to a variable with Typescript union types and type aliases.

typescript tutorial about Using Assertion to Convert Types in TypeScript

Using Assertion to Convert Types in TypeScript

2:09 typescript PRO

Sometimes the compiler needs help figuring out a type. In this lesson we learn how to help out the compiler with Typescript type assertion.

typescript tutorial about Distinguishing between types of Strings in TypeScript

Distinguishing between types of Strings in TypeScript

2:02 typescript PRO

In JavaScript, many libraries use string arguments to change behavior. In this lesson we learn how Typescript catches string related errors at compile time by assigning a string literal as a type.

typescript tutorial about Using Type Inference in TypeScript

Using Type Inference in TypeScript

2:52 typescript

This lesson explains how the Typescript compiler uses inference to guess what types we’re using, so we don’t have to annotate all the things.

typescript tutorial about Creating a Class in TypeScript

Creating a Class in TypeScript

4:00 typescript PRO

Typescript classes make traditional object oriented programming easier to read and write. In this lesson we learn about class syntax, what the constructor is and some interesting variable features.

typescript tutorial about Introduction to Static Typing

Introduction to Static Typing

1:39 typescript

This is a basic introduction to static typing with Typescript.
In this lesson we will learn about simple types in TypeScript.

typescript tutorial about Typescript Enums vs Booleans when Handling State

Typescript Enums vs Booleans when Handling State

3:49 typescript PRO

Handling state with Typescript enums, instead of booleans, is preferred because:
- Enums are more readable
- Enums can have as many states as you need while booleans only have 2
- You only need to keep track of state with 1 variable when using enums

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?