1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed CSS gradients in style properties

Discussion in 'Resolved Bug Reports' started by Arty, Mar 18, 2013.

  1. Arty

    Arty Well-Known Member

    When editing style property via WebDav, XF messes up gradients syntax.

    Example: I add the following code to a style property
    Code:
    background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%), -webkit-linear-gradient(left, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.0) 100%);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(to right, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.0) 100%);
    
    and in CSS output I see this:
    Code:
    background: rgb(226, 53, 46) url('linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(to right, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.0) 100%)'); background: rgb(226, 53, 46) url('linear-gradient(to bottom, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(to right, rgba(255, 255, 255, 0.0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.0) 100%)');
    
    First bug: its not URL, so why did XF wrap it in url()?
    Second bug: -webkit prefix magically disappeared.
     
  2. Mike

    Mike XenForo Developer Staff Member

    This is fixed now. It won't try to move unknown background-image rules into the style property background stuff and will instead keep them in the extra portion (if available).
     

Share This Page