From bc192c1ed20ba612dd8ceb3e434365bb58d05274 Mon Sep 17 00:00:00 2001 From: Marco Biedermann Date: Sat, 14 Feb 2015 15:43:20 +0100 Subject: [PATCH] UnnecessaryParentReference: Unnecessary parent selector (&) --- scss/foundation/components/_block-grid.scss | 4 ++-- scss/foundation/components/_breadcrumbs.scss | 2 +- .../foundation/components/_button-groups.scss | 18 +++++++------- scss/foundation/components/_clearing.scss | 8 +++---- scss/foundation/components/_icon-bar.scss | 10 ++++---- scss/foundation/components/_inline-lists.scss | 4 ++-- scss/foundation/components/_orbit.scss | 2 +- scss/foundation/components/_panels.scss | 4 ++-- scss/foundation/components/_reveal.scss | 6 ++--- scss/foundation/components/_tooltips.scss | 6 ++--- scss/foundation/components/_top-bar.scss | 24 +++++++++---------- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/scss/foundation/components/_block-grid.scss b/scss/foundation/components/_block-grid.scss index 7b4b5ba10..50a8ed65f 100644 --- a/scss/foundation/components/_block-grid.scss +++ b/scss/foundation/components/_block-grid.scss @@ -48,7 +48,7 @@ $block-grid-media-queries: true !default; } @include clearfix; - &>li { + > li { display: block; height: auto; float: $default-float; @@ -59,7 +59,7 @@ $block-grid-media-queries: true !default; } @if $per-row { - &>li { + > li { width: 100%/$per-row; @if $include-spacing { padding: 0 ($spacing/2) $spacing; diff --git a/scss/foundation/components/_breadcrumbs.scss b/scss/foundation/components/_breadcrumbs.scss index 4aa112171..d13303bfa 100644 --- a/scss/foundation/components/_breadcrumbs.scss +++ b/scss/foundation/components/_breadcrumbs.scss @@ -119,7 +119,7 @@ $crumb-slash: "/" !default; @include crumb-container; @include radius($crumb-radius); - &>* { + > * { @include crumbs; } } diff --git a/scss/foundation/components/_button-groups.scss b/scss/foundation/components/_button-groups.scss index 6ec2a4613..6893bad89 100644 --- a/scss/foundation/components/_button-groups.scss +++ b/scss/foundation/components/_button-groups.scss @@ -91,9 +91,9 @@ $button-group-border-width: 1px !default; // We use these to control left and right radius on first/last buttons in the group. @if $radius == true { &, - & > a, - & > button, - & > .button { @include radius(0); } + > a, + > button, + > .button { @include radius(0); } &:first-child, &:first-child > a, &:first-child > button, @@ -119,9 +119,9 @@ $button-group-border-width: 1px !default; } @else if $radius { &, - & > a, - & > button, - & > .button { @include radius(0); } + > a, + > button, + > .button { @include radius(0); } &:first-child, &:first-child > a, &:first-child > button, @@ -161,14 +161,14 @@ $button-group-border-width: 1px !default; &.even-#{$i} li { @include button-group-style($even:$i, $float:null); } } - & > li { @include button-group-style(); } + > li { @include button-group-style(); } &.stack { - & > li { @include button-group-style($orientation:vertical); float: none; } + > li { @include button-group-style($orientation:vertical); float: none; } } &.stack-for-small { - & > li { + > li { @include button-group-style($orientation:horizontal); @media #{$small-only} { @include button-group-style($orientation:vertical); diff --git a/scss/foundation/components/_clearing.scss b/scss/foundation/components/_clearing.scss index 40d3e0ac4..b6ee54971 100644 --- a/scss/foundation/components/_clearing.scss +++ b/scss/foundation/components/_clearing.scss @@ -159,7 +159,7 @@ $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default; height: 100%; width: 40px; top: 0; - & > span { + > span { position: absolute; top: 50%; display: block; @@ -171,7 +171,7 @@ $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default; } .clearing-main-prev { #{$default-float}: 0; - & > span { + > span { #{$default-float}: 5px; border-color: transparent; border-#{$opposite-direction}-color: $clearing-arrow-color; @@ -179,7 +179,7 @@ $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default; } .clearing-main-next { #{$opposite-direction}: 0; - & > span { + > span { border-color: transparent; border-#{$default-float}-color: $clearing-arrow-color; } @@ -196,7 +196,7 @@ $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default; margin-top: 10px; text-align: center; - & > ul { + > ul { display: inline-block; z-index: 999; height: 100%; diff --git a/scss/foundation/components/_icon-bar.scss b/scss/foundation/components/_icon-bar.scss index ebbdcda39..97f20cbf3 100644 --- a/scss/foundation/components/_icon-bar.scss +++ b/scss/foundation/components/_icon-bar.scss @@ -43,7 +43,7 @@ $icon-bar-disabled-cursor: $cursor-disabled-value !default; font-size: 0; display: inline-block; - & > * { + > * { text-align: center; font-size: $icon-bar-font-size; width: 25%; @@ -135,7 +135,7 @@ $icon-bar-disabled-cursor: $cursor-disabled-value !default; $image-width: $icon-bar-image-width, $image-height: $icon-bar-image-height) { - & > * { + > * { font-size: $font-size; padding: $padding; @@ -173,13 +173,13 @@ $icon-bar-disabled-cursor: $cursor-disabled-value !default; background: $bar-bg; - & > * { + > * { label { color: $bar-font-color; } i { color: $bar-icon-color; } } - & > a:hover { + > a:hover { background: $bar-hover-color; @@ -188,7 +188,7 @@ $icon-bar-disabled-cursor: $cursor-disabled-value !default; i { color: $bar-icon-color-hover; } } - & > a.active { + > a.active { background: $bar-active-color; diff --git a/scss/foundation/components/_inline-lists.scss b/scss/foundation/components/_inline-lists.scss index 9ee162dfd..37b4fd47a 100644 --- a/scss/foundation/components/_inline-lists.scss +++ b/scss/foundation/components/_inline-lists.scss @@ -39,12 +39,12 @@ $inline-list-children-display: block !default; list-style: none; overflow: $inline-list-overflow; - & > li { + > li { list-style: none; float: $default-float; margin-#{$default-float}: $inline-list-default-float-list-margin; display: $inline-list-display; - &>* { display: $inline-list-children-display; } + > * { display: $inline-list-children-display; } } } diff --git a/scss/foundation/components/_orbit.scss b/scss/foundation/components/_orbit.scss index e357b8893..93bd3a921 100644 --- a/scss/foundation/components/_orbit.scss +++ b/scss/foundation/components/_orbit.scss @@ -134,7 +134,7 @@ $orbit-timer-hide-for-small: true !default; img { display: block; max-width: 100%; } - &>* { + > * { position: absolute; top: 0; width: 100%; diff --git a/scss/foundation/components/_panels.scss b/scss/foundation/components/_panels.scss index 085d6fcf5..528a7aaa3 100644 --- a/scss/foundation/components/_panels.scss +++ b/scss/foundation/components/_panels.scss @@ -53,8 +53,8 @@ $callout-panel-link-color-hover: scale-color($callout-panel-link-color, $lightne @else { color: $panel-font-color-alt; } // Respect the padding, fool. - &>:first-child { margin-top: 0; } - &>:last-child { margin-bottom: 0; } + > :first-child { margin-top: 0; } + > :last-child { margin-bottom: 0; } @if $adjust { // We set the font color based on the darkness of the bg. diff --git a/scss/foundation/components/_reveal.scss b/scss/foundation/components/_reveal.scss index ac6fd811f..5c4f89f2a 100644 --- a/scss/foundation/components/_reveal.scss +++ b/scss/foundation/components/_reveal.scss @@ -89,9 +89,9 @@ $z-index-base: 1005; .column, .columns { min-width: 0; } // Get rid of margin from first and last element inside modal - & > :first-child { margin-top: 0; } + > :first-child { margin-top: 0; } - & > :last-child { margin-bottom: 0; } + > :last-child { margin-bottom: 0; } } @if $width { @@ -197,7 +197,7 @@ $z-index-base: 1005; max-width: none !important; margin-left: 0 !important; } - + // Modals pushed to back &.toback { z-index: $z-index-base - 2; diff --git a/scss/foundation/components/_tooltips.scss b/scss/foundation/components/_tooltips.scss index f94ff3498..5196525fa 100644 --- a/scss/foundation/components/_tooltips.scss +++ b/scss/foundation/components/_tooltips.scss @@ -65,7 +65,7 @@ $tooltip-max-width: 300px !default; color: $tooltip-font-color; background: $tooltip-bg; - &>.nub { + > .nub { display: block; #{$default-float}: $tooltip-pip-size; position: absolute; @@ -87,7 +87,7 @@ $tooltip-max-width: 300px !default; } &.round { @include radius($tooltip-rounded); - &>.nub { + > .nub { left: 2rem; } } @@ -107,7 +107,7 @@ $tooltip-max-width: 300px !default; @media #{$small} { .tooltip { - &>.nub { + > .nub { border-color: transparent transparent $tooltip-bg transparent; top: -($tooltip-pip-size * 2); } diff --git a/scss/foundation/components/_top-bar.scss b/scss/foundation/components/_top-bar.scss index fcddbbbee..28bd3ad01 100644 --- a/scss/foundation/components/_top-bar.scss +++ b/scss/foundation/components/_top-bar.scss @@ -315,7 +315,7 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text ul li { background: $topbar-dropdown-bg; - & > a { + > a { display: block; width: 100%; color: $topbar-link-color; @@ -377,7 +377,7 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text .has-dropdown { position: relative; - & > a { + > a { &:after { @if ($topbar-arrows) { @include css-triangle($topbar-dropdown-toggle-size, rgba($topbar-dropdown-toggle-color, $topbar-dropdown-toggle-alpha), $default-float); @@ -391,11 +391,11 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text } &.moved { position: static; - & > .dropdown { + > .dropdown { @include topbar-show-dropdown(); width: 100%; } - & > a:after { + > a:after { display: none; } } @@ -541,7 +541,7 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text .has-dropdown { @if($topbar-arrows) { - & > a { + > a { padding-#{$opposite-direction}: $topbar-link-padding + $topbar-link-dropdown-padding !important; &:after { @include css-triangle($topbar-dropdown-toggle-size, rgba($topbar-dropdown-toggle-color, $topbar-dropdown-toggle-alpha), top); @@ -552,13 +552,13 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text } &.moved { position: relative; - & > .dropdown { + > .dropdown { @include topbar-hide-dropdown(); } } &.hover, &.not-click:hover { - & > .dropdown { + > .dropdown { @include topbar-show-dropdown(); } } @@ -567,7 +567,7 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text } .dropdown li.has-dropdown { - & > a { + > a { @if ($topbar-dropdown-arrows) { &:after { border: none; @@ -598,7 +598,7 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text } &:not(.has-form):not(.active) { - & > a:not(.button) { + > a:not(.button) { color: $topbar-dropdown-link-color; background: $topbar-dropdown-link-bg; } @@ -625,8 +625,8 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text } } - & > ul > .divider, - & > ul > [role="separator"] { + > ul > .divider, + > ul > [role="separator"] { border-bottom: none; border-top: none; border-#{$opposite-direction}: $topbar-divider-border-bottom; @@ -682,7 +682,7 @@ $topbar-dropdown-arrows: true !default; //Set false to remove the \00bb >> text .has-dropdown { &:hover { - & > .dropdown { + > .dropdown { @include topbar-show-dropdown(); } } -- 2.47.2