Skip to content

background{0 0} becomes background{0}? #24

Description

@futtta

a{background:0 0}
becomes
a{background:0}

fix could be to change line 357 from
$css = preg_replace('/(background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);
into
$css = preg_replace('/(background|background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);

frank

Activity

mikeytown2 commented on Aug 20, 2015

@mikeytown2

Shouldn't more regex control characters be escaped; not less?

Before:
$css = preg_replace('/(background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);

After:
$css = preg_replace('/(background|background\-position|webkit\-mask\-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);

futtta commented on Aug 21, 2015

@futtta
Author

Had some issues with markdown, so some backslashes escaped ;-)

anyway, it now is how I meant it to be. questions remains whether webkit-mask-position needs escaping, but I'll leave that to @tubalmartin, he should know ;-)

added a commit that references this issue on Nov 28, 2015

tubalmartin commented on Mar 26, 2017

@tubalmartin
Owner

Fixed in v2.4.8-p7 release. Thank you guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions