├── images ├── favicon-32x32.png ├── icon-down.svg ├── icon-up.svg ├── icon-facebook.svg ├── icon-youtube.svg ├── icon-twitter.svg └── icon-instagram.svg ├── design ├── desktop-preview.jpg ├── active-states-dark.jpg ├── active-states-light.jpg ├── desktop-design-dark.jpg ├── mobile-design-dark.jpg ├── mobile-design-light.jpg └── desktop-design-light.jpg ├── app.js ├── .gitignore ├── style-guide.md ├── index.html ├── README-template.md ├── README.md └── style.css /images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/images/favicon-32x32.png -------------------------------------------------------------------------------- /design/desktop-preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/desktop-preview.jpg -------------------------------------------------------------------------------- /design/active-states-dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/active-states-dark.jpg -------------------------------------------------------------------------------- /design/active-states-light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/active-states-light.jpg -------------------------------------------------------------------------------- /design/desktop-design-dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/desktop-design-dark.jpg -------------------------------------------------------------------------------- /design/mobile-design-dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/mobile-design-dark.jpg -------------------------------------------------------------------------------- /design/mobile-design-light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/mobile-design-light.jpg -------------------------------------------------------------------------------- /design/desktop-design-light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proXDhiya/Social-media-dashboard/HEAD/design/desktop-design-light.jpg -------------------------------------------------------------------------------- /images/icon-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-facebook.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-youtube.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const toggle = document.querySelector('#toggle'); 2 | const toggleBtn = document.querySelector('#toggle > div'); 3 | let isClicked = true; 4 | 5 | toggleBtn.addEventListener('click', () => { 6 | if (isClicked) { 7 | toggleBtn.style.right = null; 8 | toggleBtn.style.left = '0px'; 9 | } else { 10 | toggleBtn.style.right = '0px'; 11 | toggleBtn.style.left = null; 12 | } 13 | isClicked = !isClicked; 14 | }); 15 | -------------------------------------------------------------------------------- /images/icon-twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Avoid accidental Sketch file upload 2 | ############################################### 3 | ## Please do not remove line 5 - thanks! 🙂 ## 4 | ############################################### 5 | *.sketch 6 | 7 | # Avoid accidental XD or Figma upload if you convert the design file 8 | ####################################################### 9 | ## Please do not remove lines 11 and 12 - thanks! 🙂 ## 10 | ####################################################### 11 | *.xd 12 | *.fig 13 | 14 | # Avoid your project being littered with annoying .DS_Store files! 15 | .DS_Store 16 | -------------------------------------------------------------------------------- /images/icon-instagram.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /style-guide.md: -------------------------------------------------------------------------------- 1 | # Front-end Style Guide 2 | 3 | ## Layout 4 | 5 | The designs were created to the following widths: 6 | 7 | - Mobile: 375px 8 | - Desktop: 1440px 9 | 10 | ## Colors 11 | 12 | ### Primary 13 | 14 | - Lime Green: hsl(163, 72%, 41%) 15 | - Bright Red: hsl(356, 69%, 56%) 16 | 17 | - Facebook: hsl(208, 92%, 53%) 18 | - Twitter: hsl(203, 89%, 53%) 19 | - Instagram: linear gradient hsl(37, 97%, 70%) to hsl(329, 70%, 58%) 20 | - YouTube: hsl(348, 97%, 39%) 21 | 22 | #### Dark Theme 23 | 24 | - Toggle: linear gradient hsl(210, 78%, 56%) to hsl(146, 68%, 55%) 25 | 26 | #### Light Theme 27 | 28 | - Toggle: hsl(230, 22%, 74%) 29 | 30 | ### Neutral 31 | 32 | #### Dark Theme 33 | 34 | - Very Dark Blue (BG): hsl(230, 17%, 14%) 35 | - Very Dark Blue (Top BG Pattern): hsl(232, 19%, 15%) 36 | - Dark Desaturated Blue (Card BG): hsl(228, 28%, 20%) 37 | - Desaturated Blue (Text): hsl(228, 34%, 66%) 38 | - White (Text): hsl(0, 0%, 100%) 39 | 40 | #### Light Theme 41 | 42 | - White (BG): hsl(0, 0%, 100%) 43 | - Very Pale Blue (Top BG Pattern): hsl(225, 100%, 98%) 44 | - Light Grayish Blue (Card BG): hsl(227, 47%, 96%) 45 | - Dark Grayish Blue (Text): hsl(228, 12%, 44%) 46 | - Very Dark Blue (Text): hsl(230, 17%, 14%) 47 | 48 | ## Typography 49 | 50 | ### Body Copy 51 | 52 | - Font size (Overview Card Headings): 14px 53 | 54 | ### Font 55 | 56 | - Family: [Inter](https://fonts.google.com/specimen/Inter) 57 | - Weights: 400, 700 58 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Frontend Mentor 9 | 10 | 11 |
12 | 24 |
25 |
26 |
27 | facebook 28 |

@nathanf

29 |
30 |

1987

31 |

Followers

32 |
33 | up 34 |

12 Today

35 |
36 |
37 |
38 |
39 | twitter 40 |

@nathanf

41 |
42 |

1044

43 |

Followers

44 |
45 | up 46 |

99 Today

47 |
48 |
49 |
50 |
51 | instagram 52 |

@realnathanf

53 |
54 |

11k

55 |

Followers

56 |
57 | up 58 |

1099 Today

59 |
60 |
61 |
62 |
63 | youtube 64 |

Nathan F.

65 |
66 |

8239

67 |

Subscribers

68 |
69 | down 70 |

144 Today

71 |
72 |
73 |
74 |
75 |

Overview - Today

76 |
77 |
78 |

Page Views

79 | facebook 80 |

87

81 |
82 | up 83 |

3%

84 |
85 |
86 |
87 |

Likes

88 | facebook 89 |

52

90 |
91 | down 92 |

2%

93 |
94 |
95 |
96 |

Likes

97 | instagram 98 |

5462

99 |
100 | up 101 |

2257%

102 |
103 |
104 |
105 |

Profile Views

106 | instagram 107 |

52k

108 |
109 | up 110 |

1375%

111 |
112 |
113 |
114 |

Retweets

115 | twitter 116 |

117

117 |
118 | up 119 |

303%

120 |
121 |
122 |
123 |

Likes

124 | twitter 125 |

507

126 |
127 | up 128 |

553%

129 |
130 |
131 |
132 |

Likes

133 | youtube 134 |

107

135 |
136 | down 137 |

19%

138 |
139 |
140 |
141 |

Total Views

142 | youtube 143 |

1407

144 |
145 | down 146 |

12%

147 |
148 |
149 |
150 |
151 |
152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /README-template.md: -------------------------------------------------------------------------------- 1 | # Frontend Mentor - Social media dashboard with theme switcher solution 2 | 3 | This is a solution to the [Social media dashboard with theme switcher challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/social-media-dashboard-with-theme-switcher-6oY8ozp_H). Frontend Mentor challenges help you improve your coding skills by building realistic projects. 4 | 5 | ## Table of contents 6 | 7 | - [Overview](#overview) 8 | - [The challenge](#the-challenge) 9 | - [Screenshot](#screenshot) 10 | - [Links](#links) 11 | - [My process](#my-process) 12 | - [Built with](#built-with) 13 | - [What I learned](#what-i-learned) 14 | - [Continued development](#continued-development) 15 | - [Useful resources](#useful-resources) 16 | - [Author](#author) 17 | - [Acknowledgments](#acknowledgments) 18 | 19 | **Note: Delete this note and update the table of contents based on what sections you keep.** 20 | 21 | ## Overview 22 | 23 | ### The challenge 24 | 25 | Users should be able to: 26 | 27 | - View the optimal layout for the site depending on their device's screen size 28 | - See hover states for all interactive elements on the page 29 | - Toggle color theme to their preference 30 | 31 | ### Screenshot 32 | 33 | ![](./screenshot.jpg) 34 | 35 | Add a screenshot of your solution. The easiest way to do this is to use Firefox to view your project, right-click the page and select "Take a Screenshot". You can choose either a full-height screenshot or a cropped one based on how long the page is. If it's very long, it might be best to crop it. 36 | 37 | Alternatively, you can use a tool like [FireShot](https://getfireshot.com/) to take the screenshot. FireShot has a free option, so you don't need to purchase it. 38 | 39 | Then crop/optimize/edit your image however you like, add it to your project, and update the file path in the image above. 40 | 41 | **Note: Delete this note and the paragraphs above when you add your screenshot. If you prefer not to add a screenshot, feel free to remove this entire section.** 42 | 43 | ### Links 44 | 45 | - Solution URL: [Add solution URL here](https://your-solution-url.com) 46 | - Live Site URL: [Add live site URL here](https://your-live-site-url.com) 47 | 48 | ## My process 49 | 50 | ### Built with 51 | 52 | - Semantic HTML5 markup 53 | - CSS custom properties 54 | - Flexbox 55 | - CSS Grid 56 | - Mobile-first workflow 57 | - [React](https://reactjs.org/) - JS library 58 | - [Next.js](https://nextjs.org/) - React framework 59 | - [Styled Components](https://styled-components.com/) - For styles 60 | 61 | **Note: These are just examples. Delete this note and replace the list above with your own choices** 62 | 63 | ### What I learned 64 | 65 | Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge. 66 | 67 | To see how you can add code snippets, see below: 68 | 69 | ```html 70 |

Some HTML code I'm proud of

71 | ``` 72 | ```css 73 | .proud-of-this-css { 74 | color: papayawhip; 75 | } 76 | ``` 77 | ```js 78 | const proudOfThisFunc = () => { 79 | console.log('🎉') 80 | } 81 | ``` 82 | 83 | If you want more help with writing markdown, we'd recommend checking out [The Markdown Guide](https://www.markdownguide.org/) to learn more. 84 | 85 | **Note: Delete this note and the content within this section and replace with your own learnings.** 86 | 87 | ### Continued development 88 | 89 | Use this section to outline areas that you want to continue focusing on in future projects. These could be concepts you're still not completely comfortable with or techniques you found useful that you want to refine and perfect. 90 | 91 | **Note: Delete this note and the content within this section and replace with your own plans for continued development.** 92 | 93 | ### Useful resources 94 | 95 | - [Example resource 1](https://www.example.com) - This helped me for XYZ reason. I really liked this pattern and will use it going forward. 96 | - [Example resource 2](https://www.example.com) - This is an amazing article which helped me finally understand XYZ. I'd recommend it to anyone still learning this concept. 97 | 98 | **Note: Delete this note and replace the list above with resources that helped you during the challenge. These could come in handy for anyone viewing your solution or for yourself when you look back on this project in the future.** 99 | 100 | ## Author 101 | 102 | - Website - [Add your name here](https://www.your-site.com) 103 | - Frontend Mentor - [@yourusername](https://www.frontendmentor.io/profile/yourusername) 104 | - Twitter - [@yourusername](https://www.twitter.com/yourusername) 105 | 106 | **Note: Delete this note and add/remove/edit lines above based on what links you'd like to share.** 107 | 108 | ## Acknowledgments 109 | 110 | This is where you can give a hat tip to anyone who helped you out on this project. Perhaps you worked in a team or got some inspiration from someone else's solution. This is the perfect place to give them some credit. 111 | 112 | **Note: Delete this note and edit this section's content as necessary. If you completed this challenge by yourself, feel free to delete this section entirely.** 113 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Frontend Mentor - Social media dashboard with theme switcher 2 | 3 | ![Design preview for the Social media dashboard with theme switcher coding challenge](./design/desktop-preview.jpg) 4 | 5 | ## Welcome! 👋 6 | 7 | Thanks for checking out this front-end coding challenge. 8 | 9 | [Frontend Mentor](https://www.frontendmentor.io) challenges help you improve your coding skills by building realistic projects. 10 | 11 | **To do this challenge, you need a basic understanding of HTML, CSS and a tiny bit of JavaScript.** 12 | 13 | ## The challenge 14 | 15 | Your challenge is to build out this Social Media Dashboard and get it looking as close to the design as possible. 16 | 17 | You can use any tools you like to help you complete the challenge. So if you've got something you'd like to practice, feel free to give it a go. 18 | 19 | Your users should be able to: 20 | 21 | - View the optimal layout for the site depending on their device's screen size 22 | - See hover states for all interactive elements on the page 23 | - Toggle color theme to their preference 24 | 25 | Want some support on the challenge? [Join our Slack community](https://www.frontendmentor.io/slack) and ask questions in the **#help** channel. 26 | 27 | ## Where to find everything 28 | 29 | Your task is to build out the project to the designs inside the `/design` folder. You will find both a mobile and a desktop version of the design. 30 | 31 | The designs are in JPG static format. Using JPGs will mean that you'll need to use your best judgment for styles such as `font-size`, `padding` and `margin`. 32 | 33 | If you would like the design files (we provide Sketch & Figma versions) to inspect the design in more detail, you can [subscribe as a PRO member](https://www.frontendmentor.io/pro). 34 | 35 | You will find all the required assets in the `/images` folder. The assets are already optimized. 36 | 37 | There is also a `style-guide.md` file containing the information you'll need, such as color palette and fonts. 38 | 39 | ## Building your project 40 | 41 | Feel free to use any workflow that you feel comfortable with. Below is a suggested process, but do not feel like you need to follow these steps: 42 | 43 | 1. Initialize your project as a public repository on [GitHub](https://github.com/). Creating a repo will make it easier to share your code with the community if you need help. If you're not sure how to do this, [have a read-through of this Try Git resource](https://try.github.io/). 44 | 2. Configure your repository to publish your code to a web address. This will also be useful if you need some help during a challenge as you can share the URL for your project with your repo URL. There are a number of ways to do this, and we provide some recommendations below. 45 | 3. Look through the designs to start planning out how you'll tackle the project. This step is crucial to help you think ahead for CSS classes to create reusable styles. 46 | 4. Before adding any styles, structure your content with HTML. Writing your HTML first can help focus your attention on creating well-structured content. 47 | 5. Write out the base styles for your project, including general content styles, such as `font-family` and `font-size`. 48 | 6. Start adding styles to the top of the page and work down. Only move on to the next section once you're happy you've completed the area you're working on. 49 | 50 | ## Deploying your project 51 | 52 | As mentioned above, there are many ways to host your project for free. Our recommend hosts are: 53 | 54 | - [GitHub Pages](https://pages.github.com/) 55 | - [Vercel](https://vercel.com/) 56 | - [Netlify](https://www.netlify.com/) 57 | 58 | You can host your site using one of these solutions or any of our other trusted providers. [Read more about our recommended and trusted hosts](https://medium.com/frontend-mentor/frontend-mentor-trusted-hosting-providers-bf000dfebe). 59 | 60 | ## Create a custom `README.md` 61 | 62 | We strongly recommend overwriting this `README.md` with a custom one. We've provided a template inside the [`README-template.md`](./README-template.md) file in this starter code. 63 | 64 | The template provides a guide for what to add. A custom `README` will help you explain your project and reflect on your learnings. Please feel free to edit our template as much as you like. 65 | 66 | Once you've added your information to the template, delete this file and rename the `README-template.md` file to `README.md`. That will make it show up as your repository's README file. 67 | 68 | ## Submitting your solution 69 | 70 | Submit your solution on the platform for the rest of the community to see. Follow our ["Complete guide to submitting solutions"](https://medium.com/frontend-mentor/a-complete-guide-to-submitting-solutions-on-frontend-mentor-ac6384162248) for tips on how to do this. 71 | 72 | Remember, if you're looking for feedback on your solution, be sure to ask questions when submitting it. The more specific and detailed you are with your questions, the higher the chance you'll get valuable feedback from the community. 73 | 74 | ## Sharing your solution 75 | 76 | There are multiple places you can share your solution: 77 | 78 | 1. Share your solution page in the **#finished-projects** channel of the [Slack community](https://www.frontendmentor.io/slack). 79 | 2. Tweet [@frontendmentor](https://twitter.com/frontendmentor) and mention **@frontendmentor**, including the repo and live URLs in the tweet. We'd love to take a look at what you've built and help share it around. 80 | 3. Share your solution on other social channels like LinkedIn. 81 | 4. Blog about your experience building your project. Writing about your workflow, technical choices, and talking through your code is a brilliant way to reinforce what you've learned. Great platforms to write on are [dev.to](https://dev.to/), [Hashnode](https://hashnode.com/), and [CodeNewbie](https://community.codenewbie.org/). 82 | 83 | We provide templates to help you share your solution once you've submitted it on the platform. Please do edit them and include specific questions when you're looking for feedback. 84 | 85 | The more specific you are with your questions the more likely it is that another member of the community will give you feedback. 86 | 87 | ## Got feedback for us? 88 | 89 | We love receiving feedback! We're always looking to improve our challenges and our platform. So if you have anything you'd like to mention, please email hi[at]frontendmentor[dot]io. 90 | 91 | This challenge is completely free. Please share it with anyone who will find it useful for practice. 92 | 93 | **Have fun building!** 🚀 94 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap'); 2 | 3 | :root { 4 | /* Colors */ 5 | --lime-green: hsl(163, 72%, 41%); 6 | --bright-red: hsl(356, 69%, 56%); 7 | --facebook: hsl(208, 92%, 53%); 8 | --twitter: hsl(203, 89%, 53%); 9 | --instagram: linear-gradient(to right, hsl(37, 97%, 70%), hsl(329, 70%, 58%)); 10 | --youtube: hsl(348, 97%, 39%); 11 | --toggle: hsl(230, 22%, 74%); 12 | --toggle-dark:hsl(228, 28%, 20%); 13 | --dark-blue: hsl(230, 17%, 14%); 14 | --very-dark: hsl(232, 19%, 15%); 15 | --dark-desaturated-blue: hsl(228, 28%, 20%); 16 | --desaturated-blue: hsl(228, 34%, 66%); 17 | --white: hsl(0, 0%, 100%); 18 | --very-pale-blue: hsl(225, 100%, 98%); 19 | --light-grayish-blue: hsl(227, 47%, 96%); 20 | --dark-grayish-blue: hsl(228, 12%, 44%); 21 | --very-dark-blue: hsl(230, 17%, 14%); 22 | /* Font */ 23 | --font-family: 'Inter', sans-serif; 24 | --font-size: 14px; 25 | --font-weight-reg: 400; 26 | --font-weight-bold: 700; 27 | } 28 | 29 | * { 30 | padding: 0; 31 | margin: 0; 32 | box-sizing: border-box; 33 | } 34 | 35 | body { 36 | background-color: var(--white); 37 | font-family: var(--font-family); 38 | font-size: var(--font-size); 39 | font-weight: var(--font-weight-reg); 40 | color: var(--dark-blue); 41 | min-height: 100vh; 42 | width: 100vw; 43 | display: grid; 44 | place-items: center; 45 | 46 | & > #app { 47 | width: 1200px; 48 | margin: 20px; 49 | 50 | & > nav { 51 | display: grid; 52 | grid-template-columns: 1fr 1fr; 53 | align-items: center; 54 | margin-bottom: 40px; 55 | 56 | & > :first-child { 57 | & > h1 { 58 | color: inherit; 59 | } 60 | & > p { 61 | color: var(--dark-grayish-blue); 62 | font-weight: var(--font-weight-bold); 63 | } 64 | } 65 | 66 | & > :last-child { 67 | justify-self: end; 68 | display: flex; 69 | align-items: center; 70 | gap: 20px; 71 | color: var(--dark-grayish-blue); 72 | font-weight: var(--font-weight-bold); 73 | 74 | & > #toggle { 75 | width: 50px; 76 | height: 25px; 77 | border-radius: 20px; 78 | background-color: var(--toggle); 79 | position: relative; 80 | transition: all 0.5s ease-in-out; 81 | 82 | & > div { 83 | margin: 3px; 84 | height: calc(100% - 6px); 85 | width: 19px; 86 | border-radius: 50%; 87 | background-color: var(--white); 88 | cursor: pointer; 89 | position: absolute; 90 | } 91 | } 92 | } 93 | } 94 | 95 | & > #global_vue { 96 | display: grid; 97 | grid-gap: 20px; 98 | grid-template-columns: repeat(4, 1fr); 99 | margin-bottom: 40px; 100 | 101 | & > .global_vue--card { 102 | width: 100%; 103 | height: 100%; 104 | padding: 10px; 105 | display: grid; 106 | border-radius: 5px; 107 | border-top-width: 5px; 108 | border-top-style: solid; 109 | background-color: var(--very-pale-blue); 110 | transition: transform 0.2s ease-in-out; 111 | 112 | &:hover { 113 | cursor: pointer; 114 | transform: scale(1.05); 115 | background-color: var(--light-grayish-blue); 116 | } 117 | 118 | & > div { 119 | justify-self: center; 120 | width: fit-content; 121 | margin-top: 20px; 122 | margin-bottom: 20px; 123 | display: flex; 124 | align-items: center; 125 | 126 | & > img { 127 | display: inline-block; 128 | margin-right: 7px; 129 | } 130 | 131 | & > p { 132 | display: inline-block; 133 | font-weight: var(--font-weight-bold); 134 | color: var(--dark-grayish-blue); 135 | } 136 | } 137 | 138 | & > p:nth-child(2) { 139 | text-align: center; 140 | font-size: 3rem; 141 | font-weight: var(--font-weight-bold); 142 | } 143 | 144 | & > p:nth-child(3) { 145 | text-align: center; 146 | font-size: 1rem; 147 | color: var(--dark-grayish-blue); 148 | text-transform: uppercase; 149 | letter-spacing: 2px; 150 | } 151 | 152 | & > div:nth-child(4) { 153 | display: flex; 154 | align-items: center; 155 | 156 | &:has([src="./images/icon-up.svg"]) > p { 157 | color: var(--lime-green); 158 | } 159 | 160 | &:not(:has([src="./images/icon-up.svg"])) > p { 161 | color: var(--bright-red); 162 | } 163 | } 164 | } 165 | } 166 | 167 | & > #basic_vue { 168 | & > h2 { 169 | margin-bottom: 40px; 170 | color: var(--dark-grayish-blue); 171 | } 172 | 173 | & > #basic_vue--cards { 174 | display: grid; 175 | grid-template-columns: repeat(4, 1fr); 176 | grid-template-rows: repeat(2, 1fr); 177 | grid-gap: 20px; 178 | 179 | & > div { 180 | padding: 20px; 181 | border-radius: 5px; 182 | background-color: var(--very-pale-blue); 183 | display: grid; 184 | grid-template-columns: 1fr 1fr; 185 | grid-template-rows: 1fr 1fr; 186 | transition: transform 0.2s ease-in-out; 187 | 188 | &:hover { 189 | cursor: pointer; 190 | transform: scale(1.05); 191 | background-color: var(--light-grayish-blue); 192 | } 193 | 194 | & > * { 195 | padding: 10px; 196 | } 197 | 198 | & > p:nth-child(1) { 199 | color: var(--dark-grayish-blue); 200 | font-weight: var(--font-weight-bold); 201 | } 202 | 203 | & > img { 204 | justify-self: end; 205 | } 206 | 207 | & > p:nth-child(3) { 208 | font-weight: var(--font-weight-bold); 209 | font-size: 1.5rem; 210 | align-self: end; 211 | } 212 | 213 | & > div { 214 | place-self: end; 215 | & > img { 216 | display: inline-block; 217 | } 218 | & > p { 219 | display: inline-block; 220 | font-weight: var(--font-weight-bold); 221 | color: var(--dark-grayish-blue); 222 | } 223 | &:has([src="./images/icon-up.svg"]) > p { 224 | color: var(--lime-green); 225 | } 226 | &:not(:has([src="./images/icon-up.svg"])) > p { 227 | color: var(--bright-red); 228 | } 229 | } 230 | } 231 | } 232 | } 233 | } 234 | } 235 | 236 | #facebook-card { 237 | border-top-color: var(--facebook); 238 | } 239 | 240 | #twitter-card { 241 | border-top-color: var(--twitter); 242 | } 243 | 244 | #instagram-card { 245 | border-top-color: var(--instagram); 246 | } 247 | 248 | #youtube-card { 249 | border-top-color: var(--youtube); 250 | } 251 | --------------------------------------------------------------------------------