You are here

image-widget.css in Open Social 8.2

.form-type-managed-file .image-widget {
  margin-bottom: 1rem;
}

.form-type-managed-file .image-widget .preview img {
  width: 100%;
}

.form-type-managed-file .image-widget .image-widget-data {
  padding: 0.5rem 1rem;
  background-color: #f3f3f3;
}

.form-type-managed-file .image-widget + .help-block {
  margin-top: -0.875rem;
}

.btn--post-remove-image {
  position: absolute;
  top: -1px;
  right: -1px;
  background: rgba(0, 0, 0, 0.2);
  border: 0;
  padding: 0;
  -webkit-transition: 0.3s background-color;
  transition: 0.3s background-color;
}

.btn--post-remove-image:hover {
  background: rgba(0, 0, 0, 0.8);
}

.btn--post-remove-image:hover .btn-icon {
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}

.btn--post-remove-image .btn-icon {
  fill: white;
  height: 32px;
  width: 32px;
  -webkit-transition: 0.3s -webkit-transform;
  transition: 0.3s -webkit-transform;
  transition: 0.3s transform;
  transition: 0.3s transform, 0.3s -webkit-transform;
}

@media (min-width: 600px) {
  .form-type-managed-file .image-widget {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }
  .form-type-managed-file .image-widget .preview {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
  }
  .form-type-managed-file .image-widget .file--image {
    margin-bottom: 0.5rem;
  }
  .form--post-create .field--name-field-post-image.container-post-image {
    -ms-flex-preferred-size: 100%;
        flex-basis: 100%;
  }
}

File

themes/socialbase/assets/css/image-widget.css
View source
  1. .form-type-managed-file .image-widget {
  2. margin-bottom: 1rem;
  3. }
  4. .form-type-managed-file .image-widget .preview img {
  5. width: 100%;
  6. }
  7. .form-type-managed-file .image-widget .image-widget-data {
  8. padding: 0.5rem 1rem;
  9. background-color: #f3f3f3;
  10. }
  11. .form-type-managed-file .image-widget + .help-block {
  12. margin-top: -0.875rem;
  13. }
  14. .btn--post-remove-image {
  15. position: absolute;
  16. top: -1px;
  17. right: -1px;
  18. background: rgba(0, 0, 0, 0.2);
  19. border: 0;
  20. padding: 0;
  21. -webkit-transition: 0.3s background-color;
  22. transition: 0.3s background-color;
  23. }
  24. .btn--post-remove-image:hover {
  25. background: rgba(0, 0, 0, 0.8);
  26. }
  27. .btn--post-remove-image:hover .btn-icon {
  28. -webkit-transform: rotate(90deg);
  29. transform: rotate(90deg);
  30. }
  31. .btn--post-remove-image .btn-icon {
  32. fill: white;
  33. height: 32px;
  34. width: 32px;
  35. -webkit-transition: 0.3s -webkit-transform;
  36. transition: 0.3s -webkit-transform;
  37. transition: 0.3s transform;
  38. transition: 0.3s transform, 0.3s -webkit-transform;
  39. }
  40. @media (min-width: 600px) {
  41. .form-type-managed-file .image-widget {
  42. display: -webkit-box;
  43. display: -ms-flexbox;
  44. display: flex;
  45. }
  46. .form-type-managed-file .image-widget .preview {
  47. -webkit-box-flex: 0;
  48. -ms-flex: 0 0 auto;
  49. flex: 0 0 auto;
  50. }
  51. .form-type-managed-file .image-widget .file--image {
  52. margin-bottom: 0.5rem;
  53. }
  54. .form--post-create .field--name-field-post-image.container-post-image {
  55. -ms-flex-preferred-size: 100%;
  56. flex-basis: 100%;
  57. }
  58. }