├── design ├── active-states.jpg ├── mobile-design.jpg ├── desktop-design.jpg └── desktop-preview.jpg ├── images ├── favicon-32x32.png ├── icon-sedans.svg ├── icon-suvs.svg └── icon-luxury.svg ├── .gitignore ├── style-guide.md ├── README.md ├── index.html └── style.css /design/active-states.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnMwendwa/3-column-preview-card/HEAD/design/active-states.jpg -------------------------------------------------------------------------------- /design/mobile-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnMwendwa/3-column-preview-card/HEAD/design/mobile-design.jpg -------------------------------------------------------------------------------- /images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnMwendwa/3-column-preview-card/HEAD/images/favicon-32x32.png -------------------------------------------------------------------------------- /design/desktop-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnMwendwa/3-column-preview-card/HEAD/design/desktop-design.jpg -------------------------------------------------------------------------------- /design/desktop-preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JohnMwendwa/3-column-preview-card/HEAD/design/desktop-preview.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Avoid accidental upload of the Sketch and Figma design files 2 | ##################################################### 3 | ## Please do not remove lines 5 and 6 - thanks! 🙂 ## 4 | ##################################################### 5 | *.sketch 6 | *.fig 7 | 8 | # Avoid accidental XD upload if you convert the design file 9 | ############################################### 10 | ## Please do not remove line 12 - thanks! 🙂 ## 11 | ############################################### 12 | *.xd 13 | 14 | # Avoid your project being littered with annoying .DS_Store files! 15 | .DS_Store 16 | .prettierignore -------------------------------------------------------------------------------- /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 | Bright orange: hsl(31, 77%, 52%) 15 | Dark cyan: hsl(184, 100%, 22%) 16 | Very dark cyan: hsl(179, 100%, 13%) 17 | 18 | ### Neutral 19 | 20 | Transparent white (paragraphs): hsla(0, 0%, 100%, 0.75) 21 | Very light gray (background, headings, buttons): hsl(0, 0%, 95%) 22 | 23 | ## Typography 24 | 25 | ### Body Copy 26 | 27 | - Font size: 15px 28 | 29 | ### Font 30 | 31 | - Family: [Lexend Deca](https://fonts.google.com/specimen/Lexend+Deca) 32 | - Weights: 400 33 | 34 | - Family: [Big Shoulders Display](https://fonts.google.com/specimen/Big+Shoulders+Display) 35 | - Weights: 700 36 | -------------------------------------------------------------------------------- /images/icon-sedans.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/icon-suvs.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Frontend Mentor - 3-column preview card component solution 2 | 3 | This is a solution to the [3-column preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/3column-preview-card-component-pH92eAR2-). 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 | - [Author](#author) 14 | 15 | ## Overview 16 | 17 | ### The challenge 18 | 19 | Users should be able to: 20 | 21 | - View the optimal layout depending on their device's screen size 22 | - See hover states for interactive elements 23 | 24 | ### Screenshot 25 | 26 | ![Project screenshot](design/desktop-preview.jpg) 27 | 28 | ### Links 29 | 30 | - Solution URL: []() 31 | - Live Site URL: []() 32 | 33 | ## My process 34 | 35 | ### Built with 36 | 37 | - Semantic HTML5 markup 38 | - CSS custom properties 39 | - Flexbox 40 | - CSS Grid 41 | - Mobile-first workflow 42 | 43 | ## Author 44 | 45 | - Website - [John Mwendwa](https://johnmwendwa.vercel.app/) 46 | - Frontend Mentor - [@JohnMwendwa](https://www.frontendmentor.io/profile/JohnMwendwa) 47 | -------------------------------------------------------------------------------- /images/icon-luxury.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | Frontend Mentor | 3-column preview card component 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 |
32 | sedan icon 33 |

Sedans

34 |

35 | Choose a sedan for its affordability and excellent fuel economy. 36 | Ideal for cruising in the city or on your next road trip. 37 |

38 | 41 |
42 |
43 | SUV icon 44 |

SUVs

45 |

46 | Take an SUV for its spacious interior, power, and versatility. 47 | Perfect for your next family vacation and off-road adventures. 48 |

49 | 52 |
53 |
54 | luxury car icon 55 |

Luxury

56 |

57 | Cruise in the best car brands without the bloated prices. Enjoy the 58 | enhanced comfort of a luxury rental and arrive in style. 59 |

60 | 63 |
64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | :root { 8 | /* Primary */ 9 | --bright-orange: hsl(31, 77%, 52%); 10 | --dark-cyan: hsl(184, 100%, 22%); 11 | --very-dark-cyan: hsl(179, 100%, 13%); 12 | 13 | /* Neutral */ 14 | /* (paragraphs) */ 15 | --transparent-white: hsla(0, 0%, 100%, 0.75); 16 | /* (background, headings, buttons) */ 17 | --very-light-gray: hsl(0, 0%, 95%); 18 | } 19 | 20 | body { 21 | font-family: "Lexend Deca", sans-serif; 22 | font-size: 0.9375rem; 23 | font-weight: 400; 24 | } 25 | 26 | img { 27 | display: block; 28 | max-width: 100%; 29 | width: 4rem; 30 | } 31 | 32 | h2 { 33 | font-family: "Big Shoulders Display", sans-serif; 34 | font-size: 3rem; 35 | text-transform: uppercase; 36 | color: var(--very-light-gray); 37 | font-weight: 700; 38 | } 39 | 40 | button { 41 | border-radius: 100vh; 42 | padding: 1rem 2rem; 43 | border: transparent; 44 | display: inline-block; 45 | color: var(--item-clr); 46 | font-size: 1rem; 47 | font-weight: 700; 48 | cursor: pointer; 49 | transition: all 0.3s; 50 | background-color: var(--very-light-gray); 51 | } 52 | 53 | button:hover { 54 | background-color: transparent; 55 | color: var(--transparent-white); 56 | outline: 1px solid var(--very-light-gray); 57 | } 58 | 59 | main { 60 | display: grid; 61 | place-content: center; 62 | background-color: var(--very-light-gray); 63 | min-height: 100vh; 64 | padding: 3rem 1rem; 65 | } 66 | 67 | .container { 68 | display: grid; 69 | grid-template-columns: 1fr; 70 | } 71 | 72 | @media screen and (min-width: 968px) { 73 | .container { 74 | grid-template-columns: 1fr 1fr 1fr; 75 | } 76 | } 77 | 78 | @media screen and (min-width: 1440px) { 79 | main { 80 | padding: 5rem 1rem; 81 | } 82 | } 83 | 84 | .card { 85 | display: flex; 86 | flex-direction: column; 87 | padding: 3rem; 88 | max-width: 19.2rem; 89 | gap: 2rem; 90 | background-color: var(--item-clr); 91 | } 92 | 93 | .card p { 94 | margin-bottom: 0rem; 95 | line-height: 1.75; 96 | color: var(--transparent-white); 97 | } 98 | 99 | @media screen and (min-width: 968px) { 100 | .card p { 101 | margin-bottom: 3rem; 102 | } 103 | } 104 | 105 | .card:nth-of-type(1) { 106 | --item-clr: var(--bright-orange); 107 | border-radius: 0.5rem 0.5rem 0 0; 108 | } 109 | .card:nth-of-type(2) { 110 | --item-clr: var(--dark-cyan); 111 | } 112 | .card:nth-of-type(3) { 113 | --item-clr: var(--very-dark-cyan); 114 | border-radius: 0 0 0.5rem 0.5rem; 115 | } 116 | 117 | @media screen and (min-width: 968px) { 118 | .card:nth-of-type(1) { 119 | border-radius: 0.5rem 0 0 0.5rem; 120 | } 121 | 122 | .card:nth-of-type(3) { 123 | border-radius: 0 0.5rem 0.5rem 0; 124 | } 125 | } 126 | 127 | .card__footer { 128 | margin-top: auto; 129 | } 130 | --------------------------------------------------------------------------------