Skip to content

Allow mixins outputting selectors to be used at the stylesheet root #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions core/stylesheets/compass/css3/_selection.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ $selection-support-threshold: $graceful-usage-threshold !default;
// during selection: color and background-color. Firefox supports the
// text-shadow property.
//
// At the stylesheet root, include the mixin within the * selector.
// At the stylesheet root, include the mixin.
//
// * {
// @include selection(#fe57a1, #fff)
// }
// @include selection(#fe57a1, #fff)
//
// If a specific element or selector's selection is being styled
// you can use that selector instead. For example:
Expand Down Expand Up @@ -49,7 +47,7 @@ $selection-support-threshold: $graceful-usage-threshold !default;
@if $current-prefix != null {
$selector: $current-prefix + '-';
}
$selector: "&::#{$selector}selection";
$selector: if("#{&}" != '', '&', '') + "::#{$selector}selection";
#{$selector} {
color: $color;
background-color: $background-color;
Expand Down