Submitted about 4 years agoA solution to the Agency landing page challenge
Sunnyside agency using SASS & Vanilla JS. Mobile first approach
@krisp-dev

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:
- Adding an
id="img"to the SVG file itself - Changing the fill value to
fill="currentColor" - 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 GitHubCommunity 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