# CSS
- Sass handwritten
[sass.pdf](../../_resources/sass.pdf)
[sass.pdf](../../_resources/sass%201.pdf)
- nth-child pseudoclass
To select the list for specific number.
For eg:
```html
);
}
export default Spinner;
```
Spinner.scss
```scss
.none {
display: none;
}
.spinner .Loading_Text {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.spinner {
border: 8px solid #f3f3f3;
border-top: 8px solid #000000;
border-radius: 50%;
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.spinnerStyle {
display: "flex";
justify-content: "center";
align-items: "center";
}
```
- Creating pill shaped button
```css
.proceed {
margin-top: 1rem;
color: white;
background-color: black;
border: none;
border-radius: 9999px;
padding: 1rem 0.5rem
}
```
set border radius as very long size
Output:

- scroll to specific position with anchor tag
- aspect-ratio

- whitespace property

- calc()
## CSS only Approach (If height is known/fixed)
When you want the middle element to span across entire page vertically, you can use `[calc()](https://developer.mozilla.org/en-US/docs/Web/CSS/calc)` which is introduced in CSS3.
Assuming we have a *fixed height* `header` and `footer` elements and we want the `section` tag to take entire available vertical height...
**[Demo](http://jsfiddle.net/WdrDH/)**
**Assumed markup** and your CSS should be
```css
html,
body {
height: 100%;
}
header {
height: 100px;
background: grey;
}
section {
height: calc(100% - (100px + 150px));
/* Adding 100px of header and 150px of footer */
background: tomato;
}
footer {
height: 150px;
background-color: blue;
}
```
```html
Expand me for remaining space
```
- centralising div

Ref:
[https://www.youtube.com/watch?v=HOM47v73yG8&list=PLBOEc6PNYgCQZl3gDUDtv034yz-kwWkFo&index=3&t=200s](https://www.youtube.com/watch?v=HOM47v73yG8&list=PLBOEc6PNYgCQZl3gDUDtv034yz-kwWkFo&index=3&t=200s)
[https://www.youtube.com/watch?v=HOM47v73yG8&list=PLBOEc6PNYgCQZl3gDUDtv034yz-kwWkFo&index=3&t=200s](https://www.youtube.com/watch?v=HOM47v73yG8&list=PLBOEc6PNYgCQZl3gDUDtv034yz-kwWkFo&index=3&t=200s)
when using this method to centralize div, when we decrease screen height then div can go out of screen. To prevent this, use position absolute and
- For setting dark theme
We need to invert all colors of the page.
```html
hello