$min-height: control-height(); $vertical-padding: ($min-height - line-height(body) - rem(2px)) / 2; // This is the adjustment needed to get the icon to appear flush with other // content around it. $plain-horizontal-adjustment: rem(10px); $stacking-order: ( item: 10, focused: 20, ); .Polaris-Pagination { display: inline-flex; &:not(.Polaris-Pagination--plain) { @include page-content-when-fully-condensed { display: flex; width: 100%; .Polaris-Pagination__Button { flex: 1 0 auto; } } } } .Polaris-Pagination--plain { .Polaris-Pagination__Button { background: transparent; border: none; cursor: pointer; appearance: none; box-shadow: none; // We always want this to have a border-radius, so it needs to override // the :first/:last-child selectors below // stylelint-disable-next-line declaration-no-important border-radius: border-radius() !important; &:hover, &:active { @include recolor-icon(color(ink)); background: transparent; border: none; box-shadow: none; } &:focus { background: plain-button-background(); border: none; box-shadow: none; } &:disabled { @include recolor-icon(color(sky, dark)); background: transparent; border: none; box-shadow: none; } &:not(:first-child) { margin-left: 0; } &:first-child { margin-left: -1 * $plain-horizontal-adjustment; } &:last-child { margin-right: -1 * $plain-horizontal-adjustment; } } } .Polaris-Pagination__Button { @include recolor-icon(color(ink, lighter)); position: relative; z-index: z-index(item, $stacking-order); display: inline-block; min-width: $min-height; margin: 0; padding: $vertical-padding spacing(tight); background: linear-gradient(to bottom, color(white), color(sky, lighter)); border: border(dark); border-radius: border-radius(); line-height: 1; color: color(ink); text-align: center; cursor: pointer; user-select: none; text-decoration: none; transition-property: color, background, border, box-shadow; transition-duration: duration(); transition-timing-function: easing(); &:hover { background: linear-gradient(to bottom, color(sky, lighter), color(sky, light)); border-color: color(sky, dark); } &:focus { z-index: z-index(focused, $stacking-order); border-color: color(indigo); outline: 0; box-shadow: 0 0 0 1px color(indigo); } &:active { // Same color gradient is necessary for background transitions background: linear-gradient(to bottom, color(sky, light), color(sky, light)); border-color: color(sky, dark); box-shadow: 0 0 0 0 transparent, inset 0 1px 1px 0 rgba(color(ink, lighter), 0.1), inset 0 1px 4px 0 rgba(color(ink, lighter), 0.2); } &:disabled { @include recolor-icon(color(ink, lightest)); background: color(sky, light); color: color(ink, lightest); cursor: default; } &:not(:first-child) { margin-left: -1px; } &:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; } &:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; } }