Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/0xabdulkhaliq/faq-accordion-card

Solution for "FAQ Accordian Card" Challenge on Frontend Mentor
https://github.com/0xabdulkhaliq/faq-accordion-card

css css3 frontend frontend-mentor frontendmentor-challenge html javascript woff woff2

Last synced: 11 days ago
JSON representation

Solution for "FAQ Accordian Card" Challenge on Frontend Mentor

Awesome Lists containing this project

README

        

frontendmentor

FAQ Accordion Card Solution



Frontend Mentor Challenge




View Demo
 · 
Report Bug
 · 
Request Feature





Abdul Khalid's Profile
   



Status Completed
   



Challenge Difficulty - Newbie





## **Preview**


FAQ Accordion Card solution desktop preview image


## **Links**

- |||
| :----- | :----- |
| Solution URL: | [FAQ Accordion Card 🎯 [ USING DETAIL SUMMARY - VANILLA CSS3 - BEM ]](https://www.frontendmentor.io/solutions/faq-accordion-card-using-detail-summary-vanilla-css3-bem-PfVhpYym1r) |
| Live Site URL: | [https://0xabdulkhalid.github.io/faq-accordion-card/](https://0xabdulkhalid.github.io/faq-accordion-card/) |
|||


## Pagespeed Insights Score:

- | Scored 100% for Both Mobile & Desktop |
| :-----: |
| 100% scored on pagespeed insights |
| |
| Check out [**Pagespeed Insights**](https://pagespeed.web.dev/analysis/https-0xabdulkhalid-github-io-faq-accordion-card/c7lfd2qg4h?form_factor=mobile) to get live score |
|||


## The challenge

- The challenge is to build out this FAQ accordion card and get it looking as close to the design as possible.

- The users should be able to:
- View the optimal layout for the component depending on their device's screen size
- See hover states for all interactive elements on the page
- Hide/Show the answer to a question when the question is clicked


## What i learned
- Usage of `woff` and `woff2` formats for font files, because i'm unaware of these formats and used `ttf` as a primary font format to utilize the effective usage of `variable font`.
- I switched to `woff` and `woff2` because they saves users bandwidth with awesome compression ratio.
- The below css snippet will help the browser to load `woff2` font format if it supports, if not then it loads `woff` as its font format.
- ```css
@font-face {
font-family: 'KumbhSans';
src: url('./fonts/KumbhSans.woff') format('woff')
,url('./fonts/KumbhSans.woff2') format('woff2');
font-weight: 1 999;
font-display: swap;
}
```
- You can see the file size of each format (metrics are compared to `KumbhSans` font family)
- | TTF | WOFF | WOFF2 |
| :--: | :--: | :--: |
|161.03kb|93.53kb|74.56kb|


## **Built With**

- ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)
- ![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white)
- ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)


## **Tools Used**

- ![Google](https://img.shields.io/badge/google-DA4437?style=for-the-badge&logo=google&logoColor=white)
- ![GitHub](https://img.shields.io/badge/github-0D1117.svg?style=for-the-badge&logo=github&logoColor=white)
- ![Arch](https://img.shields.io/badge/Arch%20Linux-1793D1?logo=arch-linux&logoColor=fff&style=for-the-badge)
- ![Visual Studio Code](https://img.shields.io/badge/Visual%20Studio%20Code-0078d7.svg?style=for-the-badge&logo=visual-studio-code&logoColor=white)


## **Acknowledgment**

* Challenge was provided by [Frontend Mentor](https://www.frontendmentor.io)


## **Let's Connect 👋**


Linkedin Profile
   


Frontend-Mentor Profile
   


Github Profile