From 9e294874a27c7279d114562f214047611567f0c1 Mon Sep 17 00:00:00 2001 From: Yan Sern Date: Sat, 7 Oct 2017 18:02:49 +0200 Subject: [PATCH] Added .is-up modifier for dropdown. (#1254) --- docs/documentation/components/dropdown.html | 37 +++++++++++++++++++++ sass/components/dropdown.sass | 6 ++++ 2 files changed, 43 insertions(+) diff --git a/docs/documentation/components/dropdown.html b/docs/documentation/components/dropdown.html index 0bea49ae..32f65594 100644 --- a/docs/documentation/components/dropdown.html +++ b/docs/documentation/components/dropdown.html @@ -192,6 +192,26 @@ variables: {% endcapture %} +{% capture dropdown_up_example %} + +{% endcapture %} + {% include subnav-components.html %}
@@ -329,6 +349,23 @@ variables: + {% include anchor.html name="Dropup" %} + +
+

+ You can add the is-up modifier to have a dropdown menu that appears above the dropdown button. +

+
+ +
+
+ {{dropdown_up_example}} +
+
+ {% highlight html %}{{dropdown_up_example}}{% endhighlight %} +
+
+ {% include variables.html %} diff --git a/sass/components/dropdown.sass b/sass/components/dropdown.sass index 5ff922df..e8ff4a4b 100644 --- a/sass/components/dropdown.sass +++ b/sass/components/dropdown.sass @@ -25,6 +25,12 @@ $dropdown-divider-background-color: $border !default .dropdown-menu left: auto right: 0 + &.is-up + .dropdown-menu + top: auto + bottom: 100% + padding-top: unset + padding-bottom: $dropdown-content-offset .dropdown-menu display: none