CSS fundamentals before learning Tailwind.

Some people believe that you need to be a CSS master before starting learning Tailwind, and that couldn't be further from the truth.

You should know some fundamentals, and I want to tell you exactly which ones.

Let's begin 🧵 CSS fundamentals before learning Tailwind
background properties.

This is used to give properties to the background of an element, it could be any element.

These are the main ones you should know about: .box {   background-color: red;   background-image: url('som
margin, padding and border properties.

The first attached image is a visual representation of how this works.

- padding is the internal margin.
- border is the border of the box.
- margin is the margin outside the box.

You can use top/right/bottom/left or the shorthand. .box {   /* margin and padding works the same */   margin-to
font properties.

This is used to change how a font looks.

These are the most used ones: .box {   font-family: Arial;   font-size: 32px;   font-weigh
width and height properties.

This sets how wide (width) or tall (height) an element is.

The default for width is the screen size.
The default for height is how much content is there inside the element.

The main units used are px, % and vw/vh (view widths, view heights). .box {   width: 50%;   height: 100vh; }
color property.

This is used to specify the color of the text.

We can use a named color (predefined ones), hex or rgb/rgba.

rgb stand for red green and blue and accepts numbers between 0 and 255.

The a in rgba stands for alpha channel (opacity) and accepts a number (0-1). .box {   color: red;   color: #dc143c;   color: rgb(220, 20,
border-radius property.

It defines the radius of the element's corner.

It works the same was margin/padding.

One value to apply to all 4.
Two values to apply top/bottom.
Four values to apply top-left/top-right/bottom-right/bottom-left. .box {   border-radius: 20px;   border-radius: 10px 15px;
:hover selector.

This modifies an element when you mouse over them.

For example, changing a background.

This example changes the background color from red to yellow: .box {   background-color: red; }  .box:hover {   background
Media queries.

This gives you the option to add properties only if a certain condition is true, for example, a screen size.

This will only apply the property if the window is 600px or smaller. @media only screen and (max-width: 600px) {   .box {     bac
Flex properties.

This helps you create beautiful and modern layouts in an easy way.

It's definitely the hardest thing to learn while learning CSS, and I can't recommend this guide by @css enough:

css-tricks.com/snippets/css/a…
You reached the end of the thread!

If you feel confident with everything I explained here and you think you're ready to tackle some Tailwind CSS, you'll be happy to know I'm building a course.

You can subscribe to updates here:

windcourse.co
And if you like my content and you would like to support me, a follow (@nachoiacovino) and a retweet to the first tweet is greatly appreciated.

If you had any problems or questions, my DMs are open and I'll be happy to help you, see you on the next thread!.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Nacho Iacovino ⚡

Nacho Iacovino ⚡ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @nachoiacovino

19 Feb
I recreated the Stack Overflow login page with Tailwind CSS.

It's not perfect but I'm happy with the end result.

What differences can you spot? 👀

What do you think? What should I recreate next? CloneOriginal
Let's a poll! Which one do you think is the real one?
If you would like to learn how to use Tailwind and how to create clones like this, you would love the course I'm building.

Sign up to stay updated!

windcourse.co
Read 4 tweets
18 Feb
How to deploy (upload) your project to the Internet.

For free.

One of the most important things when creating a website/portfolio is putting it online. People need to see what you create.

I'm gonna explain the easiest way to do it.

You are gonna love it.

Let's begin 🧵 How to upload your project ...
We are gonna use @vercel.

First, go to vercel.com/signup and create an account. This is completely free.
We need two more things, Node.js installed and a code editor, I'm using @code.

You can download Node here: nodejs.org/en/ (Recommended version)

And VSCode from here: code.visualstudio.com
Read 10 tweets
15 Feb
JavaScript fundamentals before learning React.

Some people believe that you need to be a JavaScript master before starting learning React, and that couldn't be further from the truth.

You should know some fundamentals, and I want to tell you exactly which ones.

Let's begin 🧵 JavaScript fundamentals before learning React.
let and const.

This is the ES6 way of assigning variables, it replaces "var".

"let" is for variables that are gonna be reassigned in the future.

"const" is for variables that are not gonna change, you define them and you use them, but they have a "constant" value.
imports and exports.

A big part of React is reusability. You create a component (like a button), export it, and then import it on your other components without having to write it out again. /* components/Button.js */ const Button = () => {   return <
Read 11 tweets
8 Feb
Let's build your first App in React.

React is the most popular JavaScript library to build websites nowadays.

If you have never tried it, I want to show you today how to create a very basic counter app that will teach you the fundamentals.

Let's begin! 🧵
First step!

Having Node.js installed. If you haven't, follow this link and download and install the recommended version.

nodejs.org/en/
Now we are gonna open a terminal (cmd, Bash, PowerShell...) in the folder that we want to create our project.

Write this command:

npx create-react-app my-first-app

npx will download CRA latest version and delete it when it's done. "my-first-app" is the name of our app.
Read 15 tweets
25 Jan
How to optimize images for web ⚡

One of the most common mistakes I noticed by reviewing websites is that many people don't optimize their images.

Let's take a look and why should you optimize them and how you can do it efficiently.

Let's start! 🧵
Images are one the most important parts of a website. But unoptimized images file's size is often very big.

One simple image could be 2MB, imagine if you have 10 of them. Now imagine someone with really slow internet trying to access your website. It will take forever.
Let's put an example of how we can optimize it.

This is a screenshot of my new portfolio (still under construction), when I take the screenshot, it's a .png file and the size is 539KB. Image
Read 8 tweets
23 Dec 20
Let's talk about Git.⚡

Git is the only thing that's it's common in our field. 99% of developers use it.

So you should learn it. At least the basics. And use it. On all your projects.

Let's start the thread.🧵

#100DaysOfCode #git #github #javascript #CodeNewbie #js What is Git? Let's learn th...
⭐ What is Git?

Git is a version-control system for tracking changes.

This allows you to save different versions of your projects and come back to them when necessary.

This also allows you to work in a team in a much better, organized way. ⬇
⭐ First steps.

On your project, your first command should be:

git init

This will initialize a new repository, this repository is a hidden folder called .git that tracks the changes made to files in your project and builds a history over time. ⬇
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!