Skip to content

Commit

Permalink
CSS fix (#998)
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Muravja <[email protected]>
  • Loading branch information
kyberorg committed Feb 16, 2023
1 parent 12db48d commit accb8c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 5 additions & 1 deletion frontend/css/profile_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@

.telegram-details {
display: block;
max-width: min(290px, 97%);
max-width: min(290px, 100%);
}

.telegram-details div {
margin: 0.5rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private Section createAccountSection() {
Details emailUsageDetails = createEmailUsageDetails();
HorizontalLayout telegramLayout = createTelegramLayout();

Stream.of(usernameLayout, emailLayout).forEach(VaadinUtils::setCentered);
Stream.of(usernameLayout, emailLayout, emailUsageDetails, telegramLayout).forEach(VaadinUtils::setCentered);

Section section = new Section("Accounts");
section.setContent(usernameLayout, usernameRequirements, emailLayout, emailUsageDetails, telegramLayout);
Expand All @@ -107,7 +107,6 @@ private HorizontalLayout createUsernameLayout() {
saveUsernameButton.addThemeVariants(ButtonVariant.LUMO_SUCCESS, ButtonVariant.LUMO_PRIMARY);

usernameLayout.add(usernameField, editUsernameButton);
usernameLayout.addClassName("fit-in-section");
VaadinUtils.fitLayoutInWindow(usernameLayout);
VaadinUtils.setSmallSpacing(usernameLayout);

Expand Down Expand Up @@ -141,7 +140,6 @@ private HorizontalLayout createEmailLayout() {
emailLayout.add(emailField, saveEmailButton);
}

emailLayout.addClassName("fit-in-section");
VaadinUtils.fitLayoutInWindow(emailLayout);
VaadinUtils.setSmallSpacing(emailLayout);

Expand All @@ -153,7 +151,6 @@ private HorizontalLayout createEmailLayout() {
private HorizontalLayout createTelegramLayout() {
HorizontalLayout telegramLayout = new HorizontalLayout();
telegramLayout.setAlignItems(Alignment.BASELINE);
telegramLayout.addClassName("fit-in-section");
VaadinUtils.fitLayoutInWindow(telegramLayout);
VaadinUtils.setSmallSpacing(telegramLayout);

Expand Down

0 comments on commit accb8c3

Please sign in to comment.