From d9bb7ddac5c2be077f9d1f250325bb07b4e963ce Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 11 Jul 2014 22:34:47 -0700 Subject: rearrange docs components --- docs/components/dropdowns.md | 100 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/components/dropdowns.md (limited to 'docs/components/dropdowns.md') diff --git a/docs/components/dropdowns.md b/docs/components/dropdowns.md new file mode 100644 index 000000000..bc2fb86fa --- /dev/null +++ b/docs/components/dropdowns.md @@ -0,0 +1,100 @@ +--- +layout: page +title: Dropdowns +--- + +Toggleable, contextual menu for displaying lists of links. Made interactive with the [dropdown JavaScript plugin]({{ site.bsaeurl }}javascript/#dropdowns). + +### Example + +Wrap the dropdown's trigger and the dropdown menu within `.dropdown`, or another element that declares `position: relative;`. Then add the menu's HTML. + +{% example html %} + +{% endexample %} + +### Alignment + +By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu. + +
+

May require additional positioning

+

Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain overflow properties or appear out of bounds of the viewport. Address these issues on your own as they arise.

+
+ +{% highlight html %} + +{% endhighlight %} + +### Menu headers + +Add a header to label sections of actions in any dropdown menu. + +{% example html %} + +{% endexample %} + +### Menu dividers + +Separate groups of related menu items with a divider. + +{% example html %} + +{% endexample %} + +### Disabled menu items + +Add `.disabled` to a `
  • ` in the dropdown to disable the link. + +{% example html %} + +{% endexample %} -- cgit v1.2.3