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 7903821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:50:34+00:00 2026-06-03T09:50:34+00:00

Hello World :) I’m trying to write MIXINS for BOX-SHADOW property using SASS like

  • 0

Hello World 🙂

I’m trying to write MIXINS for BOX-SHADOW property using SASS like code below.

@mixin simpleBoxShadow ($inset, $xoffset, $yoffset, $blur, $spread, $color ) {
    -webkit-box-shadow: $inset $xoffset $yoffset $blur $spread $color;
            box-shadow: $inset $xoffset $yoffset $blur $spread $color;
    ...
}

And I’m stucked with INSET value. Sometimes it should be INSET, sometimes just void.
What should I write when I’m using this MIXIN?

@include simpleBoxShadow ( -what's there?- , 10px, 10px, 10px, 10px, #000000 );

Or how can I do it another way?

  • 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-03T09:50:35+00:00Added an answer on June 3, 2026 at 9:50 am

    Those space-separated values are considered lists in SASS. You can use the join() function to join lists together. So one approach would be to do something like this:

    @mixin simpleBoxShadow ( $xoffset, $yoffset, $blur, $spread, $color, $inset: false ) {
        $shadow: $xoffset $yoffset $blur $spread $color;
    
        @if ($inset) {
            $shadow: join(inset, $shadow, space);
        }
    
        -webkit-box-shadow: $shadow;
                box-shadow: $shadow;
    }
    

    Then you can use your mixin like this:

    // with inset
    @include simpleBoxShadow( $inset: true, 10px, 10px, 10px, 10px, #000000 );
    // without inset
    @include simpleBoxShadow( 10px, 10px, 10px, 10px, #000000 );
    

    UPDATE: you might also want to consider using Compass – it’s a framework built on top of SASS that provides lots of convenience functions and mixins, including some for box-shadow.

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

Sidebar

Related Questions

I`ve created simple hello world-like plugin which draws red box. Аfter embedding into xulrunner
My expected result is: Hello world! but when i using below codes: MainDocumentPart mainDocumentPart
Complete C++ i18n gettext() hello world example has C++ code that works for a
I want to display Hello World with calibri.ttf using only AC3. How would I
Here is google's hello world code for v3: http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld this loads and displays the
Like in the basic hello world Play! app, you can do: object Application extends
This is my Hello World Remoting App. using System; using System.Collections.Generic; using System.Text; namespace
FILE: hello world I would like to use a scripting language ( BASH )
I started out with hello world application from google documentation to write a chrome
I have the following Hello World code to try out TeX rendering with matplotlib

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.