Skip to content

::selection and ::-moz-selection selectors must be defined separately to work #20

@sebastiansandqvist

Description

@sebastiansandqvist

I'm encountering a bug where the ::selection and ::moz-selection selectors have to be defined as separate rules in order to work. So, the following code will run correctly in Chrome:

::selection {
  background: #f42;
  color: #fff;
}

::-moz-selection {
  background: #f42;
  color: #fff;
}

But this will not:

::-moz-selection,
::selection {
  background: #f42;
  color: #fff;
}

The same is true for ::placeholder and similar selectors. This is the only thing preventing me from using cssshrink in production.

EDIT
This is a duplicate of #14

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