Reduce size (mask-image). Can you help me?












0















Color is fixed White color icon.png to blue color icon.png (html/css), but minimum (or maximum) how to do?



div {
width: 50px;
height: 50px;
margin: 50px;
padding: 50px;
top: 50px;
bottom: 50px;
left: 50px;
right: 50px;
background-size: 50px;
mask-size: 50px; /* not supported by Chrome */
-webkit-mask-image: 50px; /* also not supported by Chrome */

background-color: blue; /* select your want color */
-webkit-mask-image:
url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-image: url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-repeat:no-repeat;
-webkit-mask-repeat:no-repeat;
}

<div></div>


How to reduce size?



margin: 50px; padding: 50px;


no



left: 50px; right: 50px; top: 50px; bottom: 50px;


no



background-size: 50px;


no



mask-size: 50px; 


no, not supported by Chrome



webkit-mask-size: 50px; 


no, also not supported by Chrome



width: 50px; height: 50px;


and no



What to do?










share|improve this question























  • you want to reduce the size of the mask or the size of the whole icon?

    – Temani Afif
    Jan 2 at 15:05


















0















Color is fixed White color icon.png to blue color icon.png (html/css), but minimum (or maximum) how to do?



div {
width: 50px;
height: 50px;
margin: 50px;
padding: 50px;
top: 50px;
bottom: 50px;
left: 50px;
right: 50px;
background-size: 50px;
mask-size: 50px; /* not supported by Chrome */
-webkit-mask-image: 50px; /* also not supported by Chrome */

background-color: blue; /* select your want color */
-webkit-mask-image:
url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-image: url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-repeat:no-repeat;
-webkit-mask-repeat:no-repeat;
}

<div></div>


How to reduce size?



margin: 50px; padding: 50px;


no



left: 50px; right: 50px; top: 50px; bottom: 50px;


no



background-size: 50px;


no



mask-size: 50px; 


no, not supported by Chrome



webkit-mask-size: 50px; 


no, also not supported by Chrome



width: 50px; height: 50px;


and no



What to do?










share|improve this question























  • you want to reduce the size of the mask or the size of the whole icon?

    – Temani Afif
    Jan 2 at 15:05
















0












0








0








Color is fixed White color icon.png to blue color icon.png (html/css), but minimum (or maximum) how to do?



div {
width: 50px;
height: 50px;
margin: 50px;
padding: 50px;
top: 50px;
bottom: 50px;
left: 50px;
right: 50px;
background-size: 50px;
mask-size: 50px; /* not supported by Chrome */
-webkit-mask-image: 50px; /* also not supported by Chrome */

background-color: blue; /* select your want color */
-webkit-mask-image:
url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-image: url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-repeat:no-repeat;
-webkit-mask-repeat:no-repeat;
}

<div></div>


How to reduce size?



margin: 50px; padding: 50px;


no



left: 50px; right: 50px; top: 50px; bottom: 50px;


no



background-size: 50px;


no



mask-size: 50px; 


no, not supported by Chrome



webkit-mask-size: 50px; 


no, also not supported by Chrome



width: 50px; height: 50px;


and no



What to do?










share|improve this question














Color is fixed White color icon.png to blue color icon.png (html/css), but minimum (or maximum) how to do?



div {
width: 50px;
height: 50px;
margin: 50px;
padding: 50px;
top: 50px;
bottom: 50px;
left: 50px;
right: 50px;
background-size: 50px;
mask-size: 50px; /* not supported by Chrome */
-webkit-mask-image: 50px; /* also not supported by Chrome */

background-color: blue; /* select your want color */
-webkit-mask-image:
url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-image: url(https://image.flaticon.com/icons/png/512/54/54591.png);
mask-repeat:no-repeat;
-webkit-mask-repeat:no-repeat;
}

<div></div>


How to reduce size?



margin: 50px; padding: 50px;


no



left: 50px; right: 50px; top: 50px; bottom: 50px;


no



background-size: 50px;


no



mask-size: 50px; 


no, not supported by Chrome



webkit-mask-size: 50px; 


no, also not supported by Chrome



width: 50px; height: 50px;


and no



What to do?







html css png jpeg gif






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 14:53









DaniDani

62




62













  • you want to reduce the size of the mask or the size of the whole icon?

    – Temani Afif
    Jan 2 at 15:05





















  • you want to reduce the size of the mask or the size of the whole icon?

    – Temani Afif
    Jan 2 at 15:05



















you want to reduce the size of the mask or the size of the whole icon?

– Temani Afif
Jan 2 at 15:05







you want to reduce the size of the mask or the size of the whole icon?

– Temani Afif
Jan 2 at 15:05














1 Answer
1






active

oldest

votes


















0














Instead of mask you can rely on mix-blend-mode then you can easily adjust the image as a simple background:






div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





You can also change the color of only a part of the image by adjusting the pseudo element:






div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>








share|improve this answer
























  • Thank you ... :)

    – Dani
    Jan 3 at 15:50











  • @Dani don't forget to accept the answer if it solves your issue

    – Temani Afif
    Jan 7 at 19:31











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008461%2freduce-size-mask-image-can-you-help-me%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Instead of mask you can rely on mix-blend-mode then you can easily adjust the image as a simple background:






div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





You can also change the color of only a part of the image by adjusting the pseudo element:






div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>








share|improve this answer
























  • Thank you ... :)

    – Dani
    Jan 3 at 15:50











  • @Dani don't forget to accept the answer if it solves your issue

    – Temani Afif
    Jan 7 at 19:31
















0














Instead of mask you can rely on mix-blend-mode then you can easily adjust the image as a simple background:






div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





You can also change the color of only a part of the image by adjusting the pseudo element:






div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>








share|improve this answer
























  • Thank you ... :)

    – Dani
    Jan 3 at 15:50











  • @Dani don't forget to accept the answer if it solves your issue

    – Temani Afif
    Jan 7 at 19:31














0












0








0







Instead of mask you can rely on mix-blend-mode then you can easily adjust the image as a simple background:






div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





You can also change the color of only a part of the image by adjusting the pseudo element:






div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>








share|improve this answer













Instead of mask you can rely on mix-blend-mode then you can easily adjust the image as a simple background:






div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





You can also change the color of only a part of the image by adjusting the pseudo element:






div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>








div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





div.box {
width: 50px;
height: 50px;
padding: 50px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>





div.box {
width: 150px;
height: 150px;
background: url(https://image.flaticon.com/icons/png/512/54/54591.png) center/cover;
position: relative;
background-color: #fff;
}

div.box:before {
content: "";
position: absolute;
top: 20%;
left: 20%;
right: 20%;
bottom: 20%;
background: blue;
mix-blend-mode: lighten;
}

<div class="box"></div>






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 2 at 15:14









Temani AfifTemani Afif

80.5k94692




80.5k94692













  • Thank you ... :)

    – Dani
    Jan 3 at 15:50











  • @Dani don't forget to accept the answer if it solves your issue

    – Temani Afif
    Jan 7 at 19:31



















  • Thank you ... :)

    – Dani
    Jan 3 at 15:50











  • @Dani don't forget to accept the answer if it solves your issue

    – Temani Afif
    Jan 7 at 19:31

















Thank you ... :)

– Dani
Jan 3 at 15:50





Thank you ... :)

– Dani
Jan 3 at 15:50













@Dani don't forget to accept the answer if it solves your issue

– Temani Afif
Jan 7 at 19:31





@Dani don't forget to accept the answer if it solves your issue

– Temani Afif
Jan 7 at 19:31




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008461%2freduce-size-mask-image-can-you-help-me%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith