summaryrefslogtreecommitdiff
path: root/doc/development/fe_guide
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-11-17 14:43:10 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-11-17 14:43:10 +0000
commitaf2981dd3d058f3ad38de7f2e885c4be5e8c2590 (patch)
tree6cf905c3f46dffbdfc031239eb64cb39aa8951ee /doc/development/fe_guide
parent31cb9befe8549ae9f82ed9267712351ed279cd2c (diff)
parente68ee8af4d981cb7b83fae76c0a94059add495fb (diff)
downloadgitlab-ce-40016-log-header.tar.gz
Merge branch 'master' into 40016-log-header40016-log-header
* master: (21 commits) Changing OAuth lookup to be case insensitive Delete orphaned fork networks in a migration Delete the fork network when removing the last membership Resolve "Performance issues when loading large number of wiki pages" Exports a couple of project related code as es6 modules Fix go-import meta data when enabled_git_access_protocol is a blank string Add dropdowns documentation Convert migration to populate latest merge request ID into a background migration Set 0.69.0 instead of latest for codeclimate image Fix hashed storage with project transfers to another namespace De-duplicate background migration matchers defined in spec/support/migrations_helpers.rb Update database_debugging.md Update database_debugging.md Move installation of apps higher Change to Google Kubernetes Cluster and add internal links Add Ingress description from official docs Add info on creating your own k8s cluster from the cluster page Add info about the installed apps in the Cluster docs Update HA README.md to clarify GitLab support does not troubleshoot DRBD. Optimise getting the pipeline status of commits ...
Diffstat (limited to 'doc/development/fe_guide')
-rw-r--r--doc/development/fe_guide/dropdowns.md38
-rw-r--r--doc/development/fe_guide/index.md2
2 files changed, 40 insertions, 0 deletions
diff --git a/doc/development/fe_guide/dropdowns.md b/doc/development/fe_guide/dropdowns.md
new file mode 100644
index 00000000000..e1660ac5caa
--- /dev/null
+++ b/doc/development/fe_guide/dropdowns.md
@@ -0,0 +1,38 @@
+# Dropdowns
+
+
+## How to style a bootstrap dropdown
+1. Use the HTML structure provided by the [docs][bootstrap-dropdowns]
+1. Add a specific class to the top level `.dropdown` element
+
+
+ ```Haml
+ .dropdown.my-dropdown
+ %button{ type: 'button', data: { toggle: 'dropdown' }, 'aria-haspopup': true, 'aria-expanded': false }
+ %span.dropdown-toggle-text
+ Toggle Dropdown
+ = icon('chevron-down')
+
+ %ul.dropdown-menu
+ %li
+ %a
+ item!
+ ```
+
+ Or use the helpers
+ ```Haml
+ .dropdown.my-dropdown
+ = dropdown_toggle('Toogle!', { toggle: 'dropdown' })
+ = dropdown_content
+ %li
+ %a
+ item!
+ ```
+
+1. Include the mixin in CSS
+
+ ```SCSS
+ @include new-style-dropdown('.my-dropdown ');
+ ```
+
+[bootstrap-dropdowns]: https://getbootstrap.com/docs/3.3/javascript/#dropdowns
diff --git a/doc/development/fe_guide/index.md b/doc/development/fe_guide/index.md
index 8f956681693..73a03c07812 100644
--- a/doc/development/fe_guide/index.md
+++ b/doc/development/fe_guide/index.md
@@ -77,6 +77,8 @@ Vue resource specific practices and gotchas.
## [Icons](icons.md)
How we use SVG for our Icons.
+## [Dropdowns](dropdowns.md)
+How we use dropdowns.
---
## Style Guides