Submitted about 2 years ago
3 Column Preview Card styling buttons with `mix-blend-mode` ?
@OignonFugace
Design comparison
SolutionDesign
Solution retrospective
Hi everybody,
You'll find details about the project on the github repo.
Here are some of my questions :
-
About my use of
mix-blend-mode
:- The use of
mix-blend-mode
here is some sort of a hack because it does not render the button background as expected :--very-ligh-gray-color
(initial buttonbackground-color
) is not exactlywhite
hence thesreen
value formix-blend-mode
blend it with the background color of the parent that is orange or blue, resulting in a slightly colored button background color. Of course in this case this not visible, but say we change the button background color to some other shade of gray, it could became problematic. - So first question : is there a way to overcome this using
mix-blend-mode
? It would be great to be able to nest a paragraph inside the button (<a href="#" class="btn hello card-item__btn"><p>Learn More</p></a>
) and applymix-blend-mode
on that paragraph, but blending with second parent in the hierarchy. - Second question : any other way to match the
color
of the button with thebackground-color
of the parent automatically, without having to hard-code the color for each button ?- (I am thinking of using scss or sass, but not willing to dive in those at this stage.)
- The use of
-
Every other feedback are much appreciated ! Especially about my use of HTML semantic elements. Should I use
header
,section
, ..., what are best practices to divide such card-items into semantic parts ? What about theh1
, areh2
better in this case ?
Thank you very much !
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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