Skip to content
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

style(grid-list): Sort CSS so there is no descending specificity #1903

Merged
merged 2 commits into from
Jan 11, 2018
Merged
Changes from 1 commit
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
72 changes: 36 additions & 36 deletions packages/mdc-grid-list/mdc-grid-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,42 +83,6 @@ $mdc-grid-list-tile-secondary-icon-size: 24px;
.mdc-grid-list--tile-aspect-3x4 {
@include mdc-grid-list-tile-aspect(3 / 4);
}

// stylelint-disable plugin/selector-bem-pattern
// We need to disable linter here because we are nesting grid-tile under grid list here.
.mdc-grid-list--twoline-caption .mdc-grid-tile__secondary {
height: $mdc-grid-list-twoline-cap-secondary-height;
}

.mdc-grid-list--header-caption .mdc-grid-tile__secondary {
top: 0;
bottom: auto;
}

.mdc-grid-list--with-icon-align-start {
.mdc-grid-tile__secondary {
@include mdc-rtl-reflexive-property(padding, $mdc-grid-list-tile-secondary-padding * 2 + $mdc-grid-list-tile-secondary-icon-size, $mdc-grid-list-tile-secondary-padding-narrow, ".mdc-grid-list");
}

.mdc-grid-tile__icon {
@include mdc-rtl-reflexive-position(left, $mdc-grid-list-tile-secondary-padding, ".mdc-grid-list");

font-size: $mdc-grid-list-tile-secondary-icon-size;
}
}

.mdc-grid-list--with-icon-align-end {
.mdc-grid-tile__secondary {
@include mdc-rtl-reflexive-property(padding, $mdc-grid-list-tile-secondary-padding, $mdc-grid-list-tile-secondary-padding * 2 + $mdc-grid-list-tile-secondary-icon-size, ".mdc-grid-list");
}

.mdc-grid-tile__icon {
@include mdc-rtl-reflexive-position(right, $mdc-grid-list-tile-secondary-padding, ".mdc-grid-list");

font-size: $mdc-grid-list-tile-secondary-icon-size;
}
}
// stylelint-enable plugin/selector-bem-pattern
// postcss-bem-linter: end

// postcss-bem-linter: define grid-tile
Expand Down Expand Up @@ -189,4 +153,40 @@ $mdc-grid-list-tile-secondary-icon-size: 24px;
top: calc(50% - #{$mdc-grid-list-tile-secondary-icon-size} / 2);
font-size: 0;
}

// stylelint-disable plugin/selector-bem-pattern
// Linter disabled because we are nesting grid-tile under grid-list.
.mdc-grid-list--twoline-caption .mdc-grid-tile__secondary {
height: $mdc-grid-list-twoline-cap-secondary-height;
}

.mdc-grid-list--header-caption .mdc-grid-tile__secondary {
top: 0;
bottom: auto;
}

.mdc-grid-list--with-icon-align-start {
.mdc-grid-tile__secondary {
@include mdc-rtl-reflexive-property(padding, $mdc-grid-list-tile-secondary-padding * 2 + $mdc-grid-list-tile-secondary-icon-size, $mdc-grid-list-tile-secondary-padding-narrow, ".mdc-grid-list");
}

.mdc-grid-tile__icon {
@include mdc-rtl-reflexive-position(left, $mdc-grid-list-tile-secondary-padding, ".mdc-grid-list");

font-size: $mdc-grid-list-tile-secondary-icon-size;
}
}

.mdc-grid-list--with-icon-align-end {
.mdc-grid-tile__secondary {
@include mdc-rtl-reflexive-property(padding, $mdc-grid-list-tile-secondary-padding, $mdc-grid-list-tile-secondary-padding * 2 + $mdc-grid-list-tile-secondary-icon-size, ".mdc-grid-list");
}

.mdc-grid-tile__icon {
@include mdc-rtl-reflexive-position(right, $mdc-grid-list-tile-secondary-padding, ".mdc-grid-list");

font-size: $mdc-grid-list-tile-secondary-icon-size;
}
}
// stylelint-enable plugin/selector-bem-pattern
// postcss-bem-linter: end