summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/wyrm/sass/wyrm_core/_dropdown.sass
blob: ee9efc3c88a2741566403e252d59aebf15774cf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Dropdowns
//
// Located in `wyrm_core/_dropdown.sass`.
//
// Markup:
// <div class="wy-dropdown wy-dropdown-bubble {$modifiers}">
//   <span class="btn btn-info fa fa-check-circle"> Save... <span class="caret"></span></span>
//   <dl class="wy-dropdown-menu">
//     <dd><a href="">Save it as a draft</a></dd>
//     <dd><a href="">Publish now </a></dd>
//     <dd><a href="">Publish at a specific time</a></dd>
//   </dl>
// </div>
//
// .wy-dropdown-active        - Active class. You'd want to turn on/off through JS.
//
// Styleguide 8

.wy-dropdown
  position: relative
  display: inline-block
  .caret
    @extend %icon
    @extend .#{$icon-prefix}-#{$icon-caret-down}
.wy-dropdown-active .wy-dropdown-menu
  display: block
.wy-dropdown-menu
  position: absolute
  left: 0
  display: none
  float: left
  top: 100%
  min-width: 100%
  background: $dropdown-color
  z-index: $z-index-dropdown
  border: solid 1px $dropdown-border-color
  box-shadow: 0 2px 2px 0 rgba(0,0,0,.1)
  padding: $base-line-height / 2
  > dd > a
    display: block
    clear: both
    color: $text-color
    white-space: nowrap
    font-size: 90%
    padding: 0 $base-line-height / 2
    cursor: pointer
    &:hover
      background: $link-color
      color: $white
  > dd.divider
    border-top: solid 1px $dropdown-border-color
    margin: $base-line-height / 4 0
  > dd.search
    padding-bottom: $base-line-height / 2
    input[type="search"]
      width: 100%
  > dd.call-to-action
    background: darken($dropdown-color, 10%)
    text-transform: uppercase
    font-weight: 500
    font-size: 80%
    &:hover
      background: darken($dropdown-color, 10%)
    .btn
      color: $white

.wy-dropdown.wy-dropdown-up .wy-dropdown-menu
  bottom: 100%
  top: auto
  left: auto
  right: 0

.wy-dropdown.wy-dropdown-bubble
  .wy-dropdown-menu
    background: $section-background-color
    margin-top: 2px
  .wy-dropdown-menu a
    padding: $base-line-height / 4 $base-line-height / 2
    &:hover
      background: $link-color
      color: $white

.wy-dropdown.wy-dropdown-left .wy-dropdown-menu
  right: 0
  left: auto
  text-align: right

.wy-dropdown-arrow
  &:before
    content: " "
    border-bottom: 5px solid hsla(0,0%,96%,1)
    border-left: 5px solid transparent
    border-right: 5px solid transparent
    position: absolute
    display: block
    top: -4px
    left: 50%
    margin-left: -3px
  &.wy-dropdown-arrow-left:before
    left: 11px