Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0d258c4
created main login page
May 4, 2021
74d5fce
Sass structure
bbenalia May 4, 2021
b510dfc
Fix sass pages as partial files
bbenalia May 4, 2021
c2ddef9
Header & stories
bbenalia May 4, 2021
b23aba8
creating login form
May 4, 2021
41b7f14
almost finished right container
May 4, 2021
7edb792
almost finished all front page
May 4, 2021
3c8e005
general fixes
May 4, 2021
6702ea2
building sass
May 5, 2021
b37af6d
building sass 2
May 5, 2021
7e9d188
Merge branch 'main' of https://github.com/salvajin/sass-clone-instagram
May 5, 2021
6d3a808
article structure
bbenalia May 5, 2021
1a1d9ca
sass fix
May 5, 2021
fc0e882
Merge branch 'main' with santi mods
bbenalia May 5, 2021
d117113
home page
bbenalia May 5, 2021
2992172
Fix folders structure
bbenalia May 5, 2021
bcec8e3
pulishing structure
May 5, 2021
def3f25
fixed html footer
May 5, 2021
442d34a
little things fixed
May 5, 2021
9146138
changed lang
May 5, 2021
47c8585
downloadBox created
May 5, 2021
169445d
upgraded footer
May 5, 2021
42428a7
added separator, on revision
May 5, 2021
3e158fa
changed import to use
bbenalia May 5, 2021
86c818f
fix main class in login page
bbenalia May 5, 2021
322faf8
Merge branch 'main' with salvajin
bbenalia May 5, 2021
7f113c1
Fixed @import to @use styles
bbenalia May 5, 2021
b5e87dd
responsiveness created
May 5, 2021
5527466
input focus
May 5, 2021
08b8701
typo correction
May 5, 2021
79ec729
Merge branch 'main' of https://github.com/salvajin/sass-clone-instagram
May 5, 2021
f069773
Styling home page: colors, margins and paddings
bbenalia May 6, 2021
41974c0
organizing folders, separator fied
May 6, 2021
4863a71
finished register form and download bttns
May 6, 2021
d76dfb0
added font and carousel base
May 6, 2021
4db6dfd
border gradient stories
bbenalia May 6, 2021
1a3c27c
fixed things, organized
May 6, 2021
d155842
little changes
May 6, 2021
bab432f
created modules from home page
bbenalia May 6, 2021
8770d8f
ideated carousel
May 6, 2021
fcfaf00
readme questions
bbenalia May 6, 2021
469cfe3
Merge branch 'main' of https://github.com/salvajin/sass-clone-instagram
bbenalia May 6, 2021
715a6d9
finish
bbenalia May 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 134 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,150 @@
<img alt="Version" src="https://img.shields.io/badge/version-1.0-blue.svg?cacheSeconds=2592000" />
</p>

> Sass (which stands for 'Syntactically awesome style sheets) is an extension of CSS that enables you to use things like variables, nested rules, inline imports and more
>
> The purpose of this project is to learn the basics of SASS and put them into practice by building a visual replica of Instagram

## Index <!-- omit in toc -->

- [Theory](#theory)
- [Requirements](#requirements)
- [Repository](#repository)
- [Technologies used](#technologies-used)
- [Project delivery](#project-delivery)
- [Resources](#resources)

## Theory

### What is SASS? What does SASS stand for?

SASS (which stands for 'Syntactically awesome style sheets’) is an extension of CSS that enables you to use things like variables, nested rules, inline imports and more. It also helps to keep things organised and allows you to create style sheets faster.

### What is a CSS pre-processor?

A CSS preprocessor is a program that lets you generate CSS from the preprocessor's own unique syntax. There are many CSS preprocessors to choose from, however most CSS preprocessors will add some features that don't exist in pure CSS, such as mixin, nesting selector, inheritance selector, and so on. These features make the CSS structure more readable and easier to maintain.

### What does a pre-processor have to do with SASS?

SASS is one of a bunch of CSS pre-processor

### Why use SASS?

Here are seven benefits of using SASS:

- Uses the same CSS syntax
- Use of variables
- Nested syntax
- It includes mixins
- Use of modules
- It has a large community and is well documented
- If you know SASS, you can customize Bootstrap 4

### SASS has disadvantages? Which are?

- The developer must have enough time to learn new features present in this preprocessor before using it.
- Using Sass may cause losing benefits of browser’s built-in element inspector.
- Code has to be compiled
- Difficult Troubleshooting

### What is a SASS Variable? Explain why are useful

A variable allows you us store a value or a set of values, and to reuse these variables throughout our SASS files as many times we want and wherever we want. Easy, powerful, and useful.

### Explain the SASS variables property with an example.

```css
$blue: #004bb4;
$ubuntu-font: "Ubuntu", "Arial", "Helvetica", sans-serif;
$nunito-font: "Nunito", "Arial", "Helvetica", sans-serif;
```

```css
h1 {
font: $ubuntu-font;
color: $blue;
}
a {
font: $nunito-font;
background-color: $blue;
padding: 6px;
}
```

### What is a mixin? Why is it important? Give an example

Mixins are like functions in other programming languages. They return a value or set of values and can take parameters including default values. Note that SASS also has functions, so do not confuse a mixin with a function.

For example:

```css
@mixin set-font($family: "Ubuntu", $weight: 400, $style: normal) {
font-family: $family, "Arial", "Helvetica", sans-serif;
font-style: $style;
font-weight: $weight;
}
```

```css
h1 {
@include set-font;
color: $blue;
}
```

### What is SCSS? Give an example

SCSS (Sassy CSS): Uses the .scss file extension and is fully compliant with CSS syntax. It is the new version of SASS.

### What is SASS? Give an example

Indented (simply called 'Sass'): Uses .sass file extension and indentation rather than brackets; it is not fully compliant with CSS syntax, but it's quicker to write. It’s the old version of SASS, but it will never be deprecated!

### What is the difference between .scss and .sass syntax.

Example.sass - sass is the older syntax

```css
$font-stack: Helvetica,sans-serif;
$primary-color:#333;
body{
font:100% $font-stack;
color:$primary-color;
}
Extension *.scss
Requires the use of {}
Requires the use of ;
```

Example.scss - sassy css is the new syntax as of Sass 3

```css
$font-stack: Helvetica,sans-serif
$primary-color:#333
body
font:100% $font-stack
color:$primary-color
Extension *.sass
Does not requires the use of {}
Does not requires the use of ;
```

### In which cases would we use SCSS? And in which cases would we use SASS?

In large projects where there is a lot of code we will use SCSS, and if we have a little code we can use SASS to

### Explain how traditional CSS and Preprocessed CSS workflows are different.

### Can we create functions with SASS? If it is true, give an example.

### What is nesting? Is it useful? Give an example of nesting

### Difference between @use & @import? Give an example

### How can we import other CSS/SASS files in SASS? Give an example

### Explain the concept of inheritance in SASS.

### Why use @extend? Give an example

## Requirements

- You must use variables at least once in the project.
Expand Down
67 changes: 67 additions & 0 deletions assets/js/_home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.stories {
display: flex;
justify-content: space-around;
margin: 2rem 0;

img {
@include circleBorderRadius(3px, $brColorStory);
height: 5rem;
width: 5rem;
}
}

.post {
border: $thinBorder;
max-width: 700px;
margin: 2.5rem auto;

&__title {
display: flex;
justify-content: space-between;
align-items: center;
padding: $yPadding $xPadding;
img {
@include circleBorderRadius(0px, $brColor);
height: 2.5rem;
width: 2.5rem;
margin-right: 0.5rem;
}
div {
display: flex;
align-items: center;
}
> p {
opacity: 0.6;
}
}

&__image {
overflow: hidden;
}

&__icons {
font-size: 1.5rem;
display: flex;
justify-content: space-between;
padding: 1.5rem;
div {
display: flex;
i {
margin-right: 1rem;
}
}
}

&__likes {
padding: $yPadding $xPadding;
}

&__message {
padding: $yPadding $xPadding;
}

&__comments {
padding: $yPadding $xPadding;
opacity: 0.6;
}
}
10 changes: 10 additions & 0 deletions assets/sass/base/_general.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@use "../helpers/variables" as *;

main {
max-width: 1200px;
margin: 0 auto;
}

body {
background-color: $backgroundColor;
}
3 changes: 3 additions & 0 deletions assets/sass/base/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@forward 'reset';
@forward 'typography';
@forward 'general';
28 changes: 28 additions & 0 deletions assets/sass/base/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@mixin circleBorderRadius($borderWidth, $borderColor) {
border: $borderWidth solid $borderColor;
border-radius: 50%;
}


@mixin generalInput {
background-color: $backgroundColor;
font-weight: 600;
font-size: 12px;
border-radius: 6px;
border: $globalBorder;
height: 40px;

}


@mixin loginButton{
border: none;
height: 30px;
color: white;
font-weight: 600;
border: 5px $globalBorder solid;
border-radius: 5px;
width: 76%;
margin-top: 4%;
background-color: $inactiveButtonColor;
}
7 changes: 7 additions & 0 deletions assets/sass/base/_reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*,
*::after,
*::before{
padding: 0;
margin: 0;
box-sizing: border-box;
}
5 changes: 5 additions & 0 deletions assets/sass/base/_responsive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@media only screen and (max-width: 768px) {
.leftContainer {
display: no;
}
}
12 changes: 12 additions & 0 deletions assets/sass/base/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');




// text propierties

h4{
font-weight: 500;
color: #5295F6;
font-size: 15px;
}
3 changes: 3 additions & 0 deletions assets/sass/components/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@forward 'input';
@forward 'page/login/main/buttons/downloadBttn';
@forward 'page';
22 changes: 22 additions & 0 deletions assets/sass/components/_input.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use "../helpers/variables" as *;
@use "../helpers/mixins" as *;

.input {
@include generalInput();
padding-left: 3%;
align-items: center;
margin: 2%;
width: 74%;
margin-left: 13%;
flex-grow: 1;
display: flex;
flex-direction: column;
&:focus{
border: 1px orange solid;
}

::placeholder {
font-size: 10px;
opacity: 1;
}
}
2 changes: 2 additions & 0 deletions assets/sass/components/page/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@forward 'login';
@forward 'home';
2 changes: 2 additions & 0 deletions assets/sass/components/page/home/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@forward 'posts';
@forward 'stories';
50 changes: 50 additions & 0 deletions assets/sass/components/page/home/_posts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@use "../../../helpers/variables" as *;
@use "../../../helpers/mixins" as *;
@use "../../../helpers/extension" as *;

.post {
&__title {
display: flex;
justify-content: space-between;
align-items: center;
padding: $yPadding $xPadding;
img {
@include circleBorderRadius(0px, $brColor);
height: 2.5rem;
width: 2.5rem;
margin-right: 0.5rem;
}
div {
display: flex;
align-items: center;
}
> p {
opacity: 0.6;
}
}

&__image {
overflow: hidden;
}

&__icons {
font-size: 1.5rem;
display: flex;
justify-content: space-between;
padding: 1.5rem;
div {
display: flex;
i {
margin-right: 1rem;
}
}

&__comments {
opacity: 0.6;
}
.fa-heart {
font-weight: bold;
color: red;
}
}
}
Loading