Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

use sass to implement blog preview card

sass/scss
perterHUAN•250
@perterHUAN
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?
  • Styles for pages have been organized into separate files according to their categories, then integrated together, instead of being crammed into a single large file. This allows focusing on styling individual components or broader layouts during writing, thus reducing cognitive load.
  • CSS variables have been implemented, enabling flexible changes to various styles such as max-width, gap, etc. Sass functions are also utilized to calculate values for these variables.
  • Flexbox layout has been adopted to create space between sibling elements, replacing the use of margin. This approach not only simplifies the process but also eliminates the need to handle margins for the first or last element.
  • Padding has been added to the body horizontally, ensuring that on smaller screens, blog preview cards do not abut the screen boundaries, providing a more visually comfortable spacing.
What challenges did you encounter, and how did you overcome them?

empty

What specific areas of your project would you like help with?
  • I am unsure whether my HTML usage is semantically correct.
  • There's doubt about the reasonableness of certain CSS values, questioning whether they might appear too large or small under certain circumstances.
  • The logic behind choosing class names in CSS is uncertain.
  • The rationality of using CSS selectors to target elements is being questioned.
  • The categorization of styles into components (components), utility classes (utils), and layouts is under scrutiny; wondering if there are better organizational methods or other more effective ways to structure these style categories.
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on perterHUAN's solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License