Coder Social home page Coder Social logo

Comments (5)

davidsainez avatar davidsainez commented on June 25, 2024 1

I've been poking around the code a bit, and I suspect that this bug occurs when filtering out the default styles. This would make sense because only the #000000 value (which I assume would be the default) gets dropped.

from modern-screenshot.

qq15725 avatar qq15725 commented on June 25, 2024 1

Fixed in 4.4.17

from modern-screenshot.

qq15725 avatar qq15725 commented on June 25, 2024

Could you please provide me with the code of the problem? I don't seem to find the problem there

Playground link

image

from modern-screenshot.

davidsainez avatar davidsainez commented on June 25, 2024

Hello, I'm sorry for the huge delay.

But I finally got around to do some debugging and thought you might be interested. It turns out that the text-stroke copying is somehow dependent on color! This is probably why we were seeing different output. I hope this is useful. For now, a quick hack I'm using is to use #000001 as an approximation to black.

Example output

When using -webkit-text-stroke: 1px #000001; :

<div class="view_body" style="transition-property: none; -webkit-text-stroke: 1px rgb(0, 0, 1); -webkit-locale: &quot;en&quot;; width: 120.883px; transform-origin: 60.4414px 28px; text-shadow: rgb(0, 0, 0) 2px 2px 0px; text-emphasis-color: rgb(240, 117, 158); text-decoration: none solid rgb(240, 117, 158); perspective-origin: 60.4375px 28px; outline-color: rgb(240, 117, 158); min-width: auto; min-inline-size: auto; min-height: auto; min-block-size: auto; inline-size: 120.883px; height: 56px; font-size: 56px; font-family: __Luckiest_Guy_71c594, __Luckiest_Guy_Fallback_71c594; column-rule-color: rgb(240, 117, 158); color: rgb(240, 117, 158); caret-color: rgb(240, 117, 158); box-sizing: border-box; border-color: rgb(240, 117, 158); border-inline-color: rgb(240, 117, 158); border-block-color: rgb(240, 117, 158); block-size: 56px;"><div style="font-size: 56px; transition-property: none; -webkit-text-stroke: 1px rgb(0, 0, 1); -webkit-locale: &quot;en&quot;; width: 120.883px; transform-origin: 60.4414px 28px; text-shadow: rgb(0, 0, 0) 2px 2px 0px; text-emphasis-color: rgb(240, 117, 158); text-decoration: none solid rgb(240, 117, 158); perspective-origin: 60.4375px 28px; outline-color: rgb(240, 117, 158); inline-size: 120.883px; height: 56px; font-family: __Luckiest_Guy_71c594, __Luckiest_Guy_Fallback_71c594; column-rule-color: rgb(240, 117, 158); color: rgb(240, 117, 158); caret-color: rgb(240, 117, 158); box-sizing: border-box; border-color: rgb(240, 117, 158); border-inline-color: rgb(240, 117, 158); border-block-color: rgb(240, 117, 158); block-size: 56px;">xxx</div></div>

And when I use -webkit-text-stroke: 1px #000000;:

 <div class="view_body" style="transition-property: none; -webkit-text-stroke-width: 1px; -webkit-locale: &quot;en&quot;; width: 120.883px; transform-origin: 60.4414px 28px; text-shadow: rgb(0, 0, 0) 2px 2px 0px; text-emphasis-color: rgb(240, 117, 158); text-decoration: none solid rgb(240, 117, 158); perspective-origin: 60.4375px 28px; outline-color: rgb(240, 117, 158); min-width: auto; min-inline-size: auto; min-height: auto; min-block-size: auto; inline-size: 120.883px; height: 56px; font-size: 56px; font-family: __Luckiest_Guy_71c594, __Luckiest_Guy_Fallback_71c594; column-rule-color: rgb(240, 117, 158); color: rgb(240, 117, 158); caret-color: rgb(240, 117, 158); box-sizing: border-box; border-color: rgb(240, 117, 158); border-inline-color: rgb(240, 117, 158); border-block-color: rgb(240, 117, 158); block-size: 56px;"><div style="font-size: 56px; transition-property: none; -webkit-text-stroke-width: 1px; -webkit-locale: &quot;en&quot;; width: 120.883px; transform-origin: 60.4414px 28px; text-shadow: rgb(0, 0, 0) 2px 2px 0px; text-emphasis-color: rgb(240, 117, 158); text-decoration: none solid rgb(240, 117, 158); perspective-origin: 60.4375px 28px; outline-color: rgb(240, 117, 158); inline-size: 120.883px; height: 56px; font-family: __Luckiest_Guy_71c594, __Luckiest_Guy_Fallback_71c594; column-rule-color: rgb(240, 117, 158); color: rgb(240, 117, 158); caret-color: rgb(240, 117, 158); box-sizing: border-box; border-color: rgb(240, 117, 158); border-inline-color: rgb(240, 117, 158); border-block-color: rgb(240, 117, 158); block-size: 56px;">xxx</div></div>

from modern-screenshot.

davidsainez avatar davidsainez commented on June 25, 2024

Also, forgot to mention, it occurs if the color is set with -webkit-text-stroke: 1px black; and even when separating the property into -webkit-text-stroke-color and -webkit-text-stroke-width.

from modern-screenshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.