mirror of https://github.com/zulip/zulip.git
image_upload_widget: Refactor style of upload_widget's preview_image.
Forms using upload widget were using the same css for image preview. We fix this by assigning a class to the widget and applying specific styles to it.
This commit is contained in:
parent
edfb2a3948
commit
89733670fd
|
@ -35,6 +35,7 @@ export function build_widget(
|
|||
if ($preview_text !== undefined && $preview_image !== undefined) {
|
||||
const image_blob = URL.createObjectURL(file);
|
||||
$preview_image.attr("src", image_blob);
|
||||
$preview_image.addClass("upload_widget_image_preview");
|
||||
$preview_text.show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,3 +206,8 @@
|
|||
justify-content: space-around;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* CSS related to upload widget's preview image */
|
||||
.upload_widget_image_preview {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
|
|
@ -671,10 +671,6 @@ input[type="checkbox"] {
|
|||
#emoji_preview_text {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#emoji_preview_image {
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
#emoji_file_input_error {
|
||||
|
@ -889,7 +885,6 @@ input[type="checkbox"] {
|
|||
.edit_bot_avatar_preview_image,
|
||||
#add_bot_preview_image {
|
||||
height: 100px;
|
||||
object-fit: cover;
|
||||
width: 100px;
|
||||
margin: 2px 0 8px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue