_mixins.scss 3.4 KB
Newer Older
Greg Price committed
1 2 3 4 5 6 7 8
// discussion - mixins and extends
// ====================

@mixin blue-button {
  @include linear-gradient(top, #6dccf1, #38a8e5);
  display: block;
  border: 1px solid #2d81ad;
  border-radius: 3px;
9
  padding: 0 ($baseline*0.75);
Greg Price committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  height: 35px;
  color: $white;
  text-shadow: none;
  font-size: 13px;
  line-height: 35px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 1px 1px rgba(0, 0, 0, .15);

  &:hover, &:focus {
    @include linear-gradient(top, #4fbbe4, #2090d0);
    border-color: #297095;
  }
}

@mixin white-button {
  @include linear-gradient(top, $white, $gray-l5);
  display: block;
  border: 1px solid #aaa;
  border-radius: 3px;
28
  padding: 0 ($baseline*0.75);
Greg Price committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
  height: 35px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 1px 1px rgba(0, 0, 0, .15);
  color: $dark-gray;
  text-shadow: none;
  font-size: 13px;
  line-height: 35px;

  &:hover, &:focus {
    @include linear-gradient(top, $white, $gray-l6);
  }
}

@mixin dark-grey-button {
  display: block;
  border: 1px solid #222;
  border-radius: 3px;
45
  padding: 0 ($baseline*0.75);
Greg Price committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59
  height: 35px;
  background: -webkit-linear-gradient(top, #777, #555);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 1px 1px rgba(0, 0, 0, .15);
  color: $white;
  text-shadow: none;
  font-size: 13px;
  line-height: 35px;

  &:hover, &:focus {
    background: -webkit-linear-gradient(top, #888, #666);
  }
}

@mixin discussion-wmd-input {
60
  box-sizing: border-box;
Greg Price committed
61
  margin-top: 0;
62
  border: 1px solid $forum-color-border;
Greg Price committed
63 64 65
  border-radius: 3px 3px 0 0;
  padding: ($baseline/2);
  width: 100%;
66
  height: 125px;
67
  background: $forum-color-background;
Greg Price committed
68 69
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
  font-size: 13px;
70
  font-family: $sans-serif;
Greg Price committed
71 72 73 74
  line-height: 1.6;
}

@mixin discussion-wmd-preview-container {
75
  box-sizing: border-box;
76 77
  @include border-radius(0, 0, 3px, 3px);
  border: 1px solid $gray-l1;
Greg Price committed
78 79
  border-top: none;
  width: 100%;
80 81
  background: $gray-l4;
  box-shadow: 0 1px 3px $shadow-l1 inset;
Greg Price committed
82 83 84 85
}

@mixin discussion-new-post-wmd-preview-container {
  @include discussion-wmd-preview-container;
86 87
  border-color: $gray-d3;
  box-shadow: 0 1px 3px $shadow-d1 inset;
Greg Price committed
88 89 90
}

@mixin discussion-wmd-preview-label {
91
  @include padding-left($baseline/4);
Greg Price committed
92 93
  padding-top: 3px;
  width: 100%;
94
  color: $gray-l2;
Greg Price committed
95 96 97 98
  font-size: 11px;
}

@mixin discussion-wmd-preview {
99
  padding: ($baseline/2) $baseline;
100 101
  width: auto;
  color: $gray-d3;
Omar Al-Ithawi committed
102 103

  ol, ul { // Fix up the RTL-only _reset.scss, but only in specific places
104
    @include padding-left($baseline*2);
105
    @include padding-right(0);
Omar Al-Ithawi committed
106
  }
Greg Price committed
107 108 109 110 111 112 113 114 115
}

@-webkit-keyframes fadeIn {
  0% { opacity: 0.0; }
  100% { opacity: 1.0; }
}

// extends - content - text overflow by ellipsis
%cont-truncated {
116
  box-sizing: border-box;
Greg Price committed
117 118 119
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
Greg Price committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
}

@mixin forum-post-label($color) {
  @extend %t-weight4;
  @include font-size(9);
  display: inline;
  margin-top: ($baseline/4);
  border: 1px solid;
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;

  border-color: $color;
  color: $color;

  .icon {
136
    @include margin-right($baseline/5);
Greg Price committed
137 138 139
  }

  &:last-child {
140
    @include margin-right(0);
Greg Price committed
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
  }

  &.is-hidden {
    display: none;
  }
}

@mixin forum-user-label($color) {
  @include font-size(9);
  @extend %t-weight5;
  vertical-align: middle;
  margin-left: ($baseline/4);
  border-radius: 2px;
  padding: 0 ($baseline/5);
  background: $color;
  font-style: normal;
  color: white;
}