{"id":26487769,"url":"https://github.com/dedo-dev/product-preview-card-component","last_synced_at":"2025-06-24T07:34:40.146Z","repository":{"id":249659415,"uuid":"832145019","full_name":"dedo-dev/product-preview-card-component","owner":"dedo-dev","description":"First Challenge of Building responsive layout a path of Learning Path by Frontend Mentor","archived":false,"fork":false,"pushed_at":"2024-08-04T19:02:51.000Z","size":640,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T06:53:00.867Z","etag":null,"topics":["bem","css","custom-properties","flexbox","grid","html","logical-properties"],"latest_commit_sha":null,"homepage":"https://dz-product-preview-card-component.vercel.app/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dedo-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-22T12:44:19.000Z","updated_at":"2024-08-04T19:39:02.000Z","dependencies_parsed_at":"2024-08-03T20:03:34.127Z","dependency_job_id":null,"html_url":"https://github.com/dedo-dev/product-preview-card-component","commit_stats":null,"previous_names":["dedo-dev/product-preview-card-component"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dedo-dev/product-preview-card-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedo-dev%2Fproduct-preview-card-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedo-dev%2Fproduct-preview-card-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedo-dev%2Fproduct-preview-card-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedo-dev%2Fproduct-preview-card-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedo-dev","download_url":"https://codeload.github.com/dedo-dev/product-preview-card-component/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedo-dev%2Fproduct-preview-card-component/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261629454,"owners_count":23187040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bem","css","custom-properties","flexbox","grid","html","logical-properties"],"created_at":"2025-03-20T06:53:04.741Z","updated_at":"2025-06-24T07:34:35.132Z","avatar_url":"https://github.com/dedo-dev.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Frontend Mentor - Product preview card component solution\n\nThis is a solution to the [Product preview card component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/product-preview-card-component-GO7UmttRfa). Frontend Mentor challenges help you improve your coding skills by building realistic projects.\n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  - [Links](#links)\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Continued development](#continued-development)\n  - [Useful resources](#useful-resources)\n- [Author](#author)\n\n**Note: Delete this note and update the table of contents based on what sections you keep.**\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- View the optimal layout depending on their device's screen size\n- See hover and focus states for interactive elements\n\n### Screenshot\n\n### Mobile Version\n![](/images/product-card-mobile.png)\n\n### Desktop Version\n![](/images/product-card-desktop.png)\n\n### Links\n\n- Solution URL: [Frontend Mentor solution](https://www.frontendmentor.io/solutions/product-card-using-css-grid-and-fluid-spacing-bNsy9BR4pt)\n- Live Site URL: [dz-product-preview-card-component](https://dz-product-preview-card-component.vercel.app/)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Flexbox\n- CSS Grid\n- Mobile-first workflow\n- CSS Logical Properties\n- BEM\n\n### What I learned\n\nIn this challenge, I learned how to work with fluid space and how to build a responsive grid layout without using media queries. I also revisited how I used custom properties, this time I used only primitives without tokens to keep it easier to maintain, but for the next challenge, I'll combine primitives and tokens with this approach.\n\n```css\n.proud-of-this-css {\n  /* Single column on small device become two columns layout on large device */\n  grid-template-columns: repeat(auto-fit, minmax( 18rem, 1fr));\n\n  /* Fluid margin 1rem on small device growing up to 1.5rem on large device */\n  margin-block-start: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);\n}\n```\n\n### Continued development\n\nWhile awaiting JavaScript challenges, I'll be focused on CSS Grid, Flexbox, Fluid typography, Fluid spacing, Custom properties and how to build responsive layouts without using media queries.\n\n### Useful resources\n\n- [Responsive grid](https://travishorn.com/responsive-grid-in-2-minutes-with-css-grid-layout-4842a41420fe) - Short article about responsive grid layout.\n\n- [Responsive grid](https://gomakethings.com/how-to-create-a-responsive-grid-system-with-css-grid/) - Another article on how to create responsive grid layout.\n\n- [Responsive grid](https://css-tricks.com/look-ma-no-media-queries-responsive-layouts-using-css-grid/) - Last usefull article on how to make responsive grid layout without using media queries.\n\n- [How to make responsive image](https://dev.to/dostonnabotov/the-html-element-explained-48o8) - In this article we can understand how to use `\u003cpicture\u003e` to display images based on screen device.\n\n- [CSS Reset by Andy Bell](https://piccalil.li/blog/a-more-modern-css-reset/) - One of the best CSS around the web.\n\n## Author\n\n- Frontend Mentor - [@dedo-dev](https://www.frontendmentor.io/profile/dedo-dev)\n- Linkedin - [@daniele-zeppieri](https://www.linkedin.com/in/daniele-zeppieri-0b1a36252/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedo-dev%2Fproduct-preview-card-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedo-dev%2Fproduct-preview-card-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedo-dev%2Fproduct-preview-card-component/lists"}