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

  • Home
  • SEARCH
  • 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 6717779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:53:32+00:00 2026-05-26T08:53:32+00:00

I am developing in Chrome and Firefox and I’ve been having trouble with an

  • 0

I am developing in Chrome and Firefox and I’ve been having trouble with an SVG filter. when applied to a rect it seems to affect more than just the <rect> element. Below is a screenshot of the result. As you can see it shades outside of the <rect> which is undesired.

Below is the result in Chrome:
undesired result in Chrome

Below is the result in Firefox:
undesired result in FF

<?xml version="1.0" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="100%" height="100%">
<defs>
<filter id="dropshadow" height="130%">
<feGaussianBlur in="SourceAlpha" stdDeviation="10"/> 
<feOffset dx="5" dy="5" result="offsetblur"/>
<feMerge> 
<feMergeNode/>
<feMergeNode in="SourceGraphic"/> 
</feMerge>

<filter id = "I">
<feSpecularLighting specularExponent="2" lighting-color="#F3F4F3">
<fePointLight x="300" y="100" z="100"/>
</feSpecularLighting>
</filter>
</filter>
</defs>

<rect x="33%" y="33%" rx="30" ry="30" width="33%" height="300px" style="fill:#FFFFFF; filter:url(#I)"></rect>

</svg>
</body>
</html>
  • 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-05-26T08:53:33+00:00Added an answer on May 26, 2026 at 8:53 am

    This happens because the default filter effects region, as defined by the x, y, width and height parameters on the <filter> element, is 120% of the bounding box of the filtered element, not 100%.

    The specification clarifies:

    It is often necessary to provide padding space because the filter effect might impact bits slightly outside the tight-fitting bounding box on a given object. For these purposes, it is possible to provide negative percentage values for ‘x’ and ‘y’, and percentages values greater than 100% for ‘width’ and ‘height’. This, for example, is why the defaults for the filter effects region are x=”-10%” y=”-10%” width=”120%” height=”120%”.

    Changing this to 100% would still affect the entire bounding box, though, so including the areas outside the rounded corners of the <rect>. If you want to limit it to just the rectangle, you can use feComposite. E.g.

    <filter id="I">
        <feSpecularLighting specularExponent="2" lighting-color="#F3F4F3" result="light">
            <fePointLight x="300" y="100" z="100"/>
        </feSpecularLighting>
        <feComposite in="light" in2="SourceAlpha" operator="in" result="lit"/>
    </filter>
    

    Also, you’ve nested the #I filter inside the #dropshadow filter. That’s not something you can do. Are you trying to combine the lighting and drop shadow? If so, you could do that like this:

    <filter id="dropshadow">
        <feSpecularLighting specularExponent="2" lighting-color="#F3F4F3" result="light">
            <fePointLight x="300" y="100" z="100"/>
        </feSpecularLighting>
        <!-- Apply lighting inside rectangle -->
        <feComposite in="light" in2="SourceAlpha" operator="in" result="lit"/>
    
        <feGaussianBlur in="SourceAlpha" stdDeviation="10"/>
        <feOffset dx="5" dy="5" result="blur"/>
        <!-- Apply blur outside rectangle -->
        <feComposite in="blur" in2="SourceAlpha" operator="out" result="shadow"/>
    
        <!-- Combine lighting and shadow -->
        <feComposite in="shadow" in2="lit" operator="xor" />
    </filter>
    

    This doesn’t seem to work to work in Firefox, though, but then your original example doesn’t work in Firefox for me either.

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

Sidebar

Related Questions

I'm developing a website and using codes below.Chrome seems to work fine, but Firefox
I am developing a web application. My application works great on chrome and firefox,
I'm developing an asynchronous database searching tool. It currently works with firefox and chrome,
I'm developing extensions for Chrome, Safari and Firefox, and I need to add SWF
So I am developing my site in Firefox, but I checked it in Chrome
I'm developing a Chrome extension for a client which want me to embed a
I am developing my first addon for Firefox, and I'm using the Extention Developer
I'm developing a websockter server using node.js and I've discovered some quirks in Chrome.
I've been developing an app specifically for modern browsers and have made very heavy
I am developing an extension from Chrome and I need to do some changes

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.