Git Product home page Git Product logo

Comments (3)

github-actions avatar github-actions commented on September 22, 2024

It looks like this is your first issue. Welcome! 👋 One of the project maintainers will be with you as soon as possible. We appreciate your patience. To safeguard the health of the project, please take a moment to read our code of conduct.

from interactive-examples.

bsmth avatar bsmth commented on September 22, 2024

Thanks for raising this one and for the great suggestion. Here's the source CSS https://github.com/mdn/interactive-examples/blob/main/live-examples/css-examples/backgrounds-and-borders/background-clip.css#L2

text-shadow on an interactive element prevents the "background-clip: text" property from being demonstrated

I understand what you mean, but I think the example is working as the author intended relative to the other values. We could add text-shadow: none; to the last display option:

background-clip: text;
-webkit-background-clip: text;
color: transparent;
text-shadow: none;

but it's starting to get a little crowded for information (and it shows there's an interaction with text-shadow with this property), so I'm leaning towards leaving as-is in this case. What do you think?

from interactive-examples.

Denis-GH avatar Denis-GH commented on September 22, 2024

Thanks for the reply!
I agree that we shouldn't add text-shadow: none; to the last display option. But I wouldn't want to leave it as-is, because the shadow is on top of the text and it looks like just black text, that's obviously not what the author wanted to show.
To move the shadow under the text we can do something like this:

<div class="text-container">
  <span class="text">Text</span>
  <span class="text-shadow">Text</span>
</div>

but that doesn't make sense in this interactive element, so I suggest just removing the text-shadow property from the source code.

from interactive-examples.

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.