Sha256: 544fee32bf0ad83c62d48dfbc9bb935bd0d7fe1606d4d59ebef190b52308dc96

Contents?: true

Size: 1.49 KB

Versions: 39

Compression:

Stored size: 1.49 KB

Contents

@function control-height() {
  @return rem(36px);
}

@function control-vertical-padding() {
  @return (control-height() - line-height(input) - rem(2px)) / 2;
}

@function control-icon-transition() {
  @return transform duration(fast) easing(in);
}

@mixin control-backdrop($style: base) {
  @if $style == base {
    background: color(sky, dark);
    border: border(transparent);
    box-shadow:
      0 0 0 1px transparent,
      shadow(faint);
    border-radius: border-radius();
    transition-property: box-shadow, background;
    transition-duration: duration();
    transition-timing-function: easing();

    &::after {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      display: block;
      background: linear-gradient(to bottom, color(white), color(sky, lighter));
      border-radius: calc(#{border-radius()} - 1px);
    }
  } @else if $style == focused {
    background: color(indigo);
    box-shadow:
      0 0 0 1px color(indigo),
      shadow(transparent);

    &::after { background: color(white); }
  } @else if $style == error {
    background: color(red);
    box-shadow: 0 0 0 1px transparent;

    &::after { background: color(red, lighter); }
  } @else if $style == disabled {
    background: color(sky);
    box-shadow: none;

    &::after { background: color(sky, lighter); }
  } @else if $style == focused-error {
    background: color(indigo);
    box-shadow: 0 0 0 1px color(indigo);

    &::after { background: color(red, lighter); }
  }
}

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
polaris_view_helpers-1.2.11 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.10 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.9 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.8 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.7 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.6 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.5 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.4 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.3 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.2 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.1 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.2.0 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.1.6 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.1.5 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.0.5 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.0.4 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.0.3 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.0.2 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.0.1 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss
polaris_view_helpers-1.0.0 vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss