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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:00:11+00:00 2026-05-27T23:00:11+00:00

I have this in my HTML document: <a class=wbutton tint data-tint=rgba(255,0,0,.5) href=#>This should be

  • 0

I have this in my HTML document:

<a class="wbutton tint" data-tint="rgba(255,0,0,.5)" href="#">This should be red, with an opacity of 0.5</a>

and this in the CSS file:

.window > .content .wbutton.tint {
    border: solid thin attr(data-tint, color);
    box-shadow: inset 0 0 50px attr(data-tint, color);
}

Firefox returns a CSS error in Firebug. Am I doing something wrong?

According to the W3C specs for the attr() function, it should work.

(Also, there’s a page about attr() in the MDN Wiki, so I assume it should at least work in Firefox)

  • 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-27T23:00:12+00:00Added an answer on May 27, 2026 at 11:00 pm

    Looking at the grammar that’s given in the spec:

    attr( <attr-name> <type-or-unit>? [ , <fallback> ]? )
    

    It looks like the comma between the attribute name and the unit to be used needs to be dropped:

    .window > .content .wbutton.tint {
        border: solid thin attr(data-tint color);
        box-shadow: inset 0 0 50px attr(data-tint color);
    }
    

    However, even if you have the right syntax, it won’t work either. It turns out, there are no known implementations of the level 3 version of attr() as of 2012…2020. To make matters worse, it’s still at-risk as of the latest editor’s draft of the spec.

    But not all is lost: if you’d like to see this feature implemented in upcoming browsers, there is still time to suggest it in the relevant feedback channels! Here are the proposals that have been put out so far:

    • Microsoft Edge Platform, currently Under Consideration (ht Lea Verou!)

    For the record, the basic Level 2.1 version is fully supported across recent versions of all major browsers, including IE8+ and Firefox 2+, and is used with the content property for the :before and :after pseudo-elements for generated content. The MDN browser compatibility table is applicable only to this version, and not the CSS3 version.

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

Sidebar

Related Questions

I have this html: <div class=foo parent> <div class=child></div> </div> with some css: .foo{
I have a HTML document like below: <td> <div class="commentLink"> <a href="javascript:ShowBox()">Show</a> </div> <div
hope you can help me. I have html markup like this: <a href=error.htm class=button
I currently have this in my document $(document).ready(function(){ $([href$='.html']).addClass('html'); $([href$='.pdf']).addClass('pdf'); }); which styles any
i have this html: <span class=price> $61.00 <span class=detailFreeShipping>With Free Shipping</span> </span> How to
I have this HTML structure (excerpt): <td> <select id=test1 class=pub_chooser> <option value=99>All Publications</option> <option
I have this simple Lucene search code (Modified from http://www.lucenetutorial.com/lucene-in-5-minutes.html ) class Program {
I have this HTML: <a href=# onclick=window.open('TrackPackage.asp?ID=4', '', 'settings');>Track Your Package »</a> Somebody on
I have a html document that has this structure: https://i.stack.imgur.com/zrOq1.png <- sorry for link,
I have this simple project to grab HTML element inner data. This is a

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.