Sha256: 8eb77cd8cc94a378f9450c30a667479d1e75f3aa7e4b320645069b4b63e13934

Contents?: true

Size: 1.52 KB

Versions: 2

Compression:

Stored size: 1.52 KB

Contents

// Foundation for Sites
// https://get.foundation
// Licensed under MIT Open Source

////
/// @group dropdown
////

/// Padding for dropdown panes.
/// @type List
$dropdown-padding: 1rem !default;

/// Background for dropdown panes.
/// @type Color
$dropdown-background: $body-background !default;

/// Border for dropdown panes.
/// @type List
$dropdown-border: 1px solid $medium-gray !default;

/// Font size for dropdown panes.
/// @type List
$dropdown-font-size: 1rem !default;

/// Width for dropdown panes.
/// @type Number
$dropdown-width: 300px !default;

/// Border radius dropdown panes.
/// @type Number
$dropdown-radius: $global-radius !default;

/// Sizes for dropdown panes. Each size is a CSS class you can apply.
/// @type Map
$dropdown-sizes: (
  tiny: 100px,
  small: 200px,
  large: 400px,
) !default;

/// Applies styles for a basic dropdown.
@mixin dropdown-container {
  position: absolute;
  z-index: 10;

  display: none;

  width: $dropdown-width;
  padding: $dropdown-padding;

  visibility: hidden;
  border: $dropdown-border;
  border-radius: $dropdown-radius;
  background-color: $dropdown-background;

  font-size: $dropdown-font-size;


  // Allow an intermittent state to do positioning before making visible.
  &.is-opening {
    display: block;
  }

  &.is-open {
    display: block;
    visibility: visible;
  }
}

@mixin foundation-dropdown {
  .dropdown-pane {
    @include dropdown-container;
  }

  @each $name, $size in $dropdown-sizes {
    .dropdown-pane {
      &.#{$name} {
        width: $size;
      }
    }
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foundation-rails-6.9.0.0 vendor/assets/scss/components/_dropdown.scss
foundation-rails-6.6.2.0 vendor/assets/scss/components/_dropdown.scss