Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

[Issue #498] Added $transparency paramenter to linear-gradient mixin to support layered gradients #507

Closed
wants to merge 1 commit into from

Conversation

Nevraeka
Copy link

Added optional $transparency variable in the event you want to force transparent background-color. $fallback will always take the first color stop if it's not set in the mixin. By forcing a transparent background, you can do layered gradient effects.

Description
|-- Added optional '$transparency' variable in the event you want to
|   force transparent 'background-color'. $fallback will always take the
|   first color stop if it's not set in the mixin. By forcing a
|   transparent background, you can do layered gradient effects.
@joshuaogle joshuaogle changed the title [Issue #498] Added extra optional parameter for layered transparency [Issue #498] Added $transparency paramenter to linear-gradient mixin to support layered gradients Sep 26, 2014
@kaishin
Copy link

kaishin commented Nov 11, 2014

Code is looking fine. @Nevraeka Can you paste a screenshot of what you mean by layered gradient?

@Nevraeka
Copy link
Author

sorry @kaishin . I just saw this. Basically if you have positioned elements with different z-index layering and linear gradients with transparency

@Nevraeka
Copy link
Author

http://codepen.io/Nevraeka/pen/QwWapN - example with fallback
http://codepen.io/Nevraeka/pen/LEYexB - example without fallback

I'm not sure the cases will warrant a merge but it would be a nice to have. Thanks

@joshuaogle
Copy link
Contributor

@Nevraeka Did you try using $fallback: transparent? I think that would still solve your use-case unless I this is adding other functionality I don't see.

@Nevraeka
Copy link
Author

@joshuaogle Yes. Check out my codepen examples.

@tysongach
Copy link
Contributor

I’m not sure I fully understand the use-case here and I want to be sure that that is clear before adding code/new features.

To me, setting $fallback: transparent on the linear-gradient mixin, as Joshua mentioned above. accomplishes the same thing. Here’s a fork of your CodePen: http://codepen.io/tysongach/pen/aOdmKG

It’s also unclear why layered div’s are needed here, as you would be able to accomplish the same thing by using multiple colors and stop within your gradient.

@tysongach tysongach closed this May 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants