The "background" property has already been defined in this style rule

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 600
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

The "background" property has already been defined in this style rule

Post by RSteinwand » Tue May 03, 2016 9:58 am

Code: Select all

background:#ff8000;background:linear-gradient(to bottom,rgb(255,162,0) 0%,rgb(240,120,0) 50%,rgb(240,120,0) 100%);
[612] The "background" property has already been defined in this style rule. A property should only be defined once per rule (unless defining properties multiple times in order to support backward compatibility or cascading).
Hi Albert,

I wonder if it's too much of a performance impact to ignore repeated background statements if it's obvious that the first one is for backward compatibility like my example above.

I don't mind if it's something like this tho:

Code: Select all

background:rgb(0,20,70);
background:-moz-linear-gradient(top,rgba(0,20,70,1) 0%,rgba(70,85,120,1) 3%,rgba(0,15,55,1) 48%,rgba(0,15,55,1) 100%);
background:-webkit-gradient(linear,left top,left bottom, color-stop(0%,rgba(0,20,70,1)),color-stop(3%,rgba(70,85,120,1)),color-stop(48%,rgba(0,15,55,1)),color-stop(100%,rgba(0,15,55,1)));
background:-webkit-linear-gradient(top,rgba(0,20,70,1) 0%,rgba(70,85,120,1) 3%,rgba(0,15,55,1) 48%,rgba(0,15,55,1) 100%);
background:-o-linear-gradient(top,rgba(0,20,70,1) 0%,rgba(70,85,120,1) 3%,rgba(0,15,55,1) 48%,rgba(0,15,55,1) 100%);
background:-ms-linear-gradient(top,rgba(0,20,70,1) 0%,rgba(70,85,120,1) 3%,rgba(0,15,55,1) 48%,rgba(0,15,55,1) 100%);
background:linear-gradient(to bottom,rgba(0,20,70,1) 0%,rgba(70,85,120,1) 3%,rgba(0,15,55,1) 48%,rgba(0,15,55,1) 100%)
That amount of bloat should be flagged since it obviously needs cleaning up at some point. (Probably right now.) :shock:

Thanks.

BTW, I like the script that automagically increases the height of the text area. Pretty cool.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: The "background" property has already been defined in this style rule

Post by Albert Wiersch » Tue May 03, 2016 10:06 am

Hi Rick,

Certainly not a bad suggestion. I'll make a note of it as something to look into (as a "nice to have" but not a high priority).

I'm not sure what you mean by "I like the script that automagically increases the height of the text area.". Are you referring to something regarding the forum? Thanks.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 600
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: The "background" property has already been defined in this style rule

Post by RSteinwand » Tue May 03, 2016 10:34 am

Yes, this text area I'm typing in right now. (Unless that's a new Chrome feature.)
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: The "background" property has already been defined in this style rule

Post by Albert Wiersch » Tue May 03, 2016 11:17 am

RSteinwand wrote:Yes, this text area I'm typing in right now. (Unless that's a new Chrome feature.)
I see now what you're talking about. Let me try it in Firefox... works there too.... let's try IE.... yep... and Edge too. I recently updated the forum so maybe this is a new forum feature.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 600
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: The "background" property has already been defined in this style rule

Post by RSteinwand » Tue May 03, 2016 12:02 pm

Probably a jQuery plugin.

I think it's pretty cool, but I don't have anything on my site where there's a need for anything more than a sentence, maybe two so I guess I'll quit trying to find the code.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: The "background" property has already been defined in this style rule

Post by Albert Wiersch » Tue May 03, 2016 1:08 pm

It also seems like it would be a good candidate for a new HTML or CSS feature... like a new "autoexpand" attribute on the "textarea" element. :D
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 600
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: The "background" property has already been defined in this style rule

Post by RSteinwand » Wed May 04, 2016 6:18 pm

Works for me.

By default textarea in html5 is resizeable.

http://www.w3schools.com/cssref/css3_pr_resize.asp
Rick

Post Reply