Make '-error' class more specific to avoid unwanted side effects

[ci skip]
pull/8352/head
Henriette Darge 5 years ago
parent fc19d43a89
commit 7dce128129
  1. 2
      app/assets/stylesheets/openproject/_generic.sass
  2. 8
      frontend/src/app/components/resizer/wp-resizer.component.ts

@ -117,5 +117,5 @@
.-no-z-index
z-index: 0 !important
.-error
.-error-font
color: $content-form-error-color !important

@ -211,12 +211,12 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A
}
private manageErrorClass(shouldBePresent:boolean) {
  if (shouldBePresent && !this.resizer.classList.contains('-error')) {
   this.resizer.classList.add('-error');
  if (shouldBePresent && !this.resizer.classList.contains('-error-font')) {
   this.resizer.classList.add('-error-font');
  }
if (!shouldBePresent && this.resizer.classList.contains('-error')) {
this.resizer.classList.remove('-error');
if (!shouldBePresent && this.resizer.classList.contains('-error-font')) {
this.resizer.classList.remove('-error-font');
}
}
}

Loading…
Cancel
Save