Completed my first #frontendmentor challenge using #parcel

There was a learning curve, particularly with regard to how it handles relative paths. But I really liked being able to use custom media queries and nested media queries!

https://www.frontendmentor.io/solutions/github-user-search-app-RmQax1_NfR#comment-63a05e47a01489593714e242

Frontend Mentor | Github API search app made with Parcel, future CSS syntax, BEM coding challenge solution

10high's front-end solution for the GitHub user search app coding challenge on Frontend Mentor

Frontend Mentor

Also, I was surprised to learn that you can use a #CSS custom property as the value for an attribute in HTML, like so:
<svg class="header__toggleIcon" width="20" height="20" xmlns="http://www.w3.org/2000/svg">
<g fill="var(--toggleModeFontColor)" fill-rule="nonzero">
<path d="..." />
</g>
</svg>

I'm not sure yet why it works...

SVG namespace

@10high SVG world is full of surprises :) By the way, when using inline SVGs you can just delete

xmlns="http://www.w3.org/2000/svg"

to save some bits.

SVG namespace

@massimovilla Actually, it turns out that #parcel (which uses htmlnano) does automatically strip xmlns="..."
After your comment, I was curious to see whether it would.
@10high That's great, thanks for sharing! Sooner or later I should try #parcel.

@10high It works because it's a presentation attribute (spec link https://svgwg.org/svg2-draft/styling.html#PresentationAttributes). That is, can be set both as an attribute on the SVG element or as a CSS property in a stylesheet.

Unfortunately, attributes inside SVG filters or gradients can't be set to custom properties. I'd kill for that to be possible using the value of the CSS custom property set on the element the filter or gradient is applied on. As it is, I need to create two separate almost identical filters or gradients.

Styling — SVG 2

@anatudor thank you! I'm gonna need some time decode all the info though 😆