Git Product home page Git Product logo

Comments (5)

twostraws avatar twostraws commented on September 15, 2024

Hi, Joe! I've added initial support for gradients; they work really well. However, they are background gradients, whereas you're looking for masking what looks like something fairly custom. From what I understand, there is some CSS support for this with a WebKit prefix, but there isn't any support for it in Ignite at this time.

from ignite.

mergesort avatar mergesort commented on September 15, 2024

This looks great, I love how you mimicked SwiftUI's backgroundStyle.

I did a little bit of research and admittedly my web development experience is relatively weak compared to my Swift, but I was able to put together a minimal solution that works across browsers. Not sure if you'd like to do anything with it but I can confirm that this works in Chrome, Firefox, and Safari, all of the colors looking approximately how I would want them to render.

Plinky Serif

<html lang="en">
<head>
	<style>
		body {
			display: flex;
		}
		.gradient-text {
			font-size: 50px; /* Adjust as needed */
			font-weight: bold;
			background: linear-gradient(to right, #3b82f6, #9333ea, #f472b6, #fb923c);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			background-clip: text; /* For Firefox */
			color: transparent; /* Fallback for browsers that do not support text-fill-color */
		}
	</style>
</head>
<body>
	<div class="gradient-text">Plinky</div>
</body>
</html>

from ignite.

pd95 avatar pd95 commented on September 15, 2024

@twostraws: How about adding a style (conforming to HeadElement) to allow injecting such customization classes?
Either "structured" (e.g. distinction between rules for class and tags) or just "raw" (e.g. just the style tag with the content as shown above).

from ignite.

twostraws avatar twostraws commented on September 15, 2024

@mergesort I looked into how it might work too, and although the CSS itself seems straightforward I'm not really knowledgeable enough to know the full range of how it works. That is, while we could make it work easily enough for one example, what happens if folks apply it to other elements that we hadn't tried? I'd certainly be interested to see some PRs from folks who know this particular piece of CSS better than I do!

from ignite.

twostraws avatar twostraws commented on September 15, 2024

@pd95 I suspect the right way to do that particular thing is by adding custom stylesheet into the theme using MetaLink, then placing it in the Assets folder.

from ignite.

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.