Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8781837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:24:40+00:00 2026-06-13T20:24:40+00:00

Making a mixin for properties like border-radius is easy: vendor(name, args) -webkit-{name} args -moz-{name}

  • 0

Making a mixin for properties like border-radius is easy:

vendor(name, args)
    -webkit-{name} args
    -moz-{name} args
    -ie-{name} args
    -o-{name} args
    {name} args

border-radius()
    vendor('border-radius', arguments)

#test
    border-radius 5px

But what if I want to create a transparent vendor mixin for linear-gradient? Unlike border-radius, linear-gradient is not a property but an argument, e.g.

#test
    background-image linear-gradient(top, #f00 0%, #00f 100%)

I’m thinking I have to create a mixin called background-image and check if the first argument is linear-gradient. Is Stylus capable of such advanced logic? If so, how can I accomplish what I’m trying to do?

Thanks for any help on the matter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:24:42+00:00Added an answer on June 13, 2026 at 8:24 pm

    Are you familiar with the nib project? http://visionmedia.github.com/nib/ It has all of the mixins you would want for stylus. Even if you don’t end up using nib, you can still look at their code (https://github.com/visionmedia/nib/blob/master/lib/nib/gradients.styl#L106 for linear-gradient)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting an error like this: Sass::SyntaxError: Properties aren't allowed at the root
Making a small WCF test program which is based on a Store that has
Let's say I have a table making a junction between two tables... like this:
Making a server in java, First off, Here's the code. AnsiConsole.out.println(This is a Test.);
Making lots of progress in a rails 3.1 to 3.2.6 upgrade for a Heroku
Making a new site but something is happening to it in IE8. The social
Making a word document of our network set-up. We have about 7 servers and
Making a new site but something is happening to it in IE. I've purchased
Making a simple application, so when the user logs out of Windows, it of
Making an adobe flex ui in which data that is calculated must use proprietary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.