Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 4 years ago

Sunnyside agency using SASS & Vanilla JS. Mobile first approach

Kris Pietrzak•340
@krisp-dev
A solution to the Agency landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Definitely underestimated this challenge, looked like an easy design to begin with but it got harder and harder going from Mobile to Desktop widths.

Ended up once again using inline SVG's as I couldn't get anything else to work. At the start I tried doing the following:

  1. Adding an id="img" to the SVG file itself
  2. Changing the fill value to fill="currentColor"
  3. Calling the SVG in HTML
<svg class="svg-image">
     <use xlink:href='../images/nameOfImage.svg#img'></use>
</svg>

And then changing the fill value by targeting the SVG's class name.

It all worked well however I couldn't manipulate the SVG's height and width even by hard coding these values. It kept getting the default SVG 300x150 values applied by the HTML.

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 Kris Pietrzak'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
  • Use cases

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