_shame.scss 6.04 KB
Newer Older
1 2
// edX LMS - shame
// ====================
3 4
// NOTE: use for any bad-form/orphaned scss that knowingly violate edX FED architecture/standards
// see - http://csswizardry.com/2013/04/shame-css/
5

6 7 8
// edx.org marketing site - 7/2013 visual button revamp

// extends btn
9
%m-btn {
10
  @include box-sizing(border-box);
11
  @include transition(color $tmg-f2 ease-in-out, background $tmg-f2 ease-in-out, box-shadow $tmg-f2 ease-in-out);
12 13 14 15 16
  display: inline-block;
  cursor: pointer;
  text-decoration: none;

  &:hover, &:active {
17 18 19

  }

20 21 22
  &.disabled, &[disabled] {
    cursor: default;
    pointer-events: none;
23
  }
24
}
25

26
%m-btn-pill {
27 28
  border-radius: ($baseline/5);
}
29

30
%m-btn-rounded {
31 32
  border-radius: ($baseline/2);
}
33

34
%m-btn-edged {
35 36 37 38
  border-radius: ($baseline/10);
}

// primary button
39 40 41
%m-btn-base {
  @extend %m-btn;
  @extend %m-btn-edged;
42 43 44 45 46
  border: none;
  padding:($baseline/2) ($baseline);
  text-align: center;
  text-shadow: none;
  font-weight: 500;
47
  letter-spacing: 0;
48

49
  &.disabled, &[disabled], &.is-disabled {
50
    background: $action-primary-disabled-bg;
51

52
    &:hover, &:focus {
53
      background: $action-primary-disabled-bg !important; // needed for IE currently
54
    }
55
  }
56
}
57

58
// primary button
59 60
%m-btn-primary {
  @extend %m-btn-base;
61 62 63
  box-shadow: 0 2px 1px 0 $action-primary-shadow;
  background: $action-primary-bg;
  color: $action-primary-fg;
64

65
  &:hover, &:active, &:focus {
66
    background: $action-primary-focused-bg;
67
  }
68
  &:focus {
69
    box-shadow: 0 0 6px 0 $action-primary-active-focused-shadow;
70
  }
71 72

  &.current, &.active {
73 74 75
    box-shadow: inset 0 2px 1px 1px $action-primary-active-shadow;
    background: $action-primary-active-bg;
    color: $action-primary-active-fg;
76

77
    &:hover, &:active, &:focus {
78 79
      box-shadow: inset 0 2px 1px 1px $action-primary-active-focused-shadow;
      color: $action-primary-active-focused-fg;
80 81 82
    }
  }

83 84
  &.disabled, &[disabled] {
    box-shadow: none;
85
    background: $action-primary-disabled-bg; // needed for IE currently
86 87
  }
}
88

89
// secondary button
90 91
%m-btn-secondary {
  @extend %m-btn-base;
92 93 94
  box-shadow: 0 2px 1px 0 $action-secondary-shadow;
  background: $action-secondary-bg;
  color: $action-secondary-fg;
95

96
  &:hover, &:active, &:focus {
97
    background: $action-secondary-focused-bg;
98
  }
99
  &:focus {
100
    box-shadow: 0 0 6px 0 $action-primary-active-focused-shadow;
101
  }
102

103
  &.current, &.active {
104 105 106
    box-shadow: inset 0 2px 1px 1px $action-secondary-active-shadow;
    background: $action-secondary-active-bg;
    color: $action-secondary-active-fg;
107

108
    &:hover, &:active, &:focus {
109 110
      box-shadow: inset 0 2px 1px 1px $action-secondary-active-focused-shadow;
      color: $action-secondary-active-focused-fg;
111 112 113
    }
  }

114 115
  &.disabled, &[disabled] {
    box-shadow: none;
116
    background: $action-secondary-disabled-bg; // needed for IE currently
117 118 119 120 121 122 123
  }
}


// ====================

// edx.org marketing site - needed, but bad overrides with importants
124
.view-register, .view-login, .view-passwordreset, .view-survey {
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139

  .form-actions button[type="submit"] {
    text-transform: none;
    vertical-align: middle;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
  }
}




// ====================

// edx.org marketing site - registration iframe band-aid (poor form enough to isolate out)
140
.view-iframe, .view-iframe-content {
141
  background: transparent !important;
142 143 144
  overflow: hidden;
}

145
.view-partial-mktgregister {
146
  background: transparent !important;
147 148 149 150 151 152

  // dimensions needed for course about page on marketing site
  .wrapper-view {
    overflow: hidden;
  }

153
  // nav list
154
  .list-actions {
155 156 157 158 159 160 161 162 163 164
    list-style: none;
    margin: 0;
    padding: 0;

    .item {
      margin: 0;
    }
  }

  .action {
165
    font-size: 16px;
166
    font-weight: 500;
167

168 169
    // register or access courseware
    &.action-register, &.access-courseware {
170
      @extend %m-btn-primary;
171
      display: block;
172 173

      .track {
174
        @include transition(all $tmg-f2 ease-in-out);
175
        color: $white;
176 177
        display: block;
        font-size: 13px;
178 179
        line-height: 2em;
        opacity: 0.6;
180 181
      }

182
      &:hover .track, &:focus .track {
183
        opacity: 1.0;
184
      }
185 186 187 188

      &.has-option-verified {
        padding-top: 12px !important;
      }
189
    }
190

191 192
    // already registered but course not started or registration is closed
    &.is-registered, &.registration-closed {
193
      @extend %m-btn-secondary;
194
      pointer-events: none !important;
195
      display: block;
196
    }
197 198

    // coming soon
199
    &.coming-soon {
200
      @extend %m-btn-secondary;
201 202
      pointer-events: none !important;
      outline: none;
203
      display: block;
204
    }
205 206
  }
}
207

208 209
// ====================

210
// Verification fixes
211 212
.verification-process {

213
  //overriding reset link style for nav/header
214 215
  header.global {

216
    .logo a:hover, .logo:active, .logo a:focus {
217 218 219 220 221
      border: none;
      text-decoration: none;
      padding-bottom: 0;
    }

222
    .nav-global a:hover, .nav-global a:active, .nav-global a:focus {
223 224 225
      border: none;
    }
  }
226 227 228 229 230

  // overriding ridiculous hover on input type=button
  #content .action-primary:hover {
    background-image: none;
  }
231 232
}

233 234 235 236 237

// ====================


// The Following is to enable themes to display H1s on login and register pages
238 239 240 241 242 243 244
.view-login .introduction header h1,
.view-register .introduction header h1 {
  @include login_register_h1_style;
}

footer .references {
  @include footer_references_style;
245
}
246 247 248 249 250 251 252 253 254 255 256 257

// ====================

// modal semantic button resetting - overriding the poorly scoped button mixin styling
.close-modal, button.close-modal {
  @extend %ui-reset-button;

  &:focus {
    border: none !important;
    outline: thin dotted !important;
  }
}
258 259 260

// ====================

261 262 263 264
// poor cascade made worse by CSS splitting requires us to redefine the dashboard views' visual top padding
.dashboard {
  padding-top: 60px;
}
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280

// ====================

// poor definition/scope on ul elements inside .vert-mod element in courseware - override needed for inline discussion editing
.course-content .discussion-post.edit-post-form .topic-menu {
  padding-left: 0;
  list-style: none;

  .topic-menu-item {
    margin-bottom: 0;
  }
}

.course-content .discussion-post.edit-post-form .topic-submenu {
  list-style: none;
}