Ekamjot-Kaire / fast-pages

Apache License 2.0
0 stars 0 forks source link

sass hacks issue #32

Open Ekamjot-Kaire opened 1 year ago

Ekamjot-Kaire commented 1 year ago

CONTRIBUTORS: Ishi and Ekam

Part 1: Reflections

Part 2: Sass Demo

LINK TO REPO: https://github.com/Random-IGN/SCSS-Hacks PROJECT: pixel art

https://user-images.githubusercontent.com/111466888/234775853-01121f78-49f1-45ea-b053-15b578ced8aa.mov

REFLECTION w/ 3 SASS features used:

1) Variables:

Screen Shot 2023-04-26 at 11 21 34 PM

Allowed the background color of the color picker div to be changed. By setting the background color as the variable $selected-color, the variable can be referenced in other parts of the code. Would not be possible to do in CSS without SASS, since div stylings can't be changed without script. Some other variables were used to set a default color for a background or a button color -- used to make code more organized and readable

2) For loops:

Screen Shot 2023-04-26 at 11 21 52 PM

The grid is created through SASS for loops. This allows each cell to be created in much less code than would be required if they had to be created individually. Would be possible without SASS but it would be MUCH more tedious. Having different variables within for loops also makes changing the size of the grid easier, which makes the code more dynamic

3) Operator:

Screen Shot 2023-04-26 at 11 22 11 PM

Used to set the input of the color-picker to the background color of the color-box div. Also would not be possible without SASS (if only using CSS).