Transition - all in one suggestions

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: 551
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Transition - all in one suggestions

Post by RSteinwand » Tue Oct 11, 2016 11:44 am

Hi Albert,

I copied the transition values in Firefox today using the css style reported by Firefox web developer and the properties came out separated. This isn't usually a problem with something common like "border" or "background", but I can't do "transition" without looking it up so it came out like this:

Code: Select all

transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out;transition-delay:0s
I figured, no problem, CSE will suggest that I combine them or at least give me the suggested order to clean up the code.... nope. :roll: Either this one isn't that common or it slipped thru the cracks.

I did find what I'm looking for tho.

Code: Select all

transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay];
So I added the combined code, leaving the original code...

Code: Select all

transition:border-radius .2s ease-in-out 0s;transition-property:all;transition-duration:.2s;transition-timing-function:ease-in-out;transition-delay:0s
... and not even a suggestion that I had repeated code like you add for "background". Boy am I spoiled. :D

You probably have other less common code that isn't critiqued like "background" so if that's your plan, I can live with that. Just thought I'd bug this just in case it's not intentional.

Thanks.
Rick

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

Re: Transition - all in one suggestions

Post by Albert Wiersch » Tue Oct 11, 2016 11:40 pm

Thanks Rick. I'll reexamine what CSE HTML Validator does for "background" and see if it makes sense to do something similar for "transition".

UPDATE: I added a message like this:
The "transition" shorthand property and the "transition-duration" property have both been used. The "transition" shorthand property already defines the following properties: "transition-delay", "transition-duration", "transition-property", and "transition-timing-function". Therefore, the "transition-duration" property has been defined twice. Consider using only the "transition" shorthand property.
Image
Albert Wiersch

Post Reply