When encountering discrepancies in text stroke rendering across different browsers, the issue may lie with the interaction between -webkit-text-stroke and variable fonts.
To resolve this, we leverage the CSS paint-order property, which allows us to control the rendering order of fill and stroke. By setting paint-order: stroke fill, we prioritize the stroke over the text color, creating the desired effect.
Add the following CSS rule to your stylesheet:
.outline {
-webkit-text-stroke: 0.04em black;
paint-order: stroke fill;
}
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3